afs: Convert to separately allocated bdi
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: David Howells <dhowells@redhat.com> CC: linux-afs@lists.infradead.org Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
@@ -106,11 +106,6 @@ struct afs_volume *afs_volume_lookup(struct afs_mount_params *params)
|
||||
volume->cell = params->cell;
|
||||
volume->vid = vlocation->vldb.vid[params->type];
|
||||
|
||||
volume->bdi.ra_pages = VM_MAX_READAHEAD*1024/PAGE_SIZE;
|
||||
ret = bdi_setup_and_register(&volume->bdi, "afs");
|
||||
if (ret)
|
||||
goto error_bdi;
|
||||
|
||||
init_rwsem(&volume->server_sem);
|
||||
|
||||
/* look up all the applicable server records */
|
||||
@@ -156,8 +151,6 @@ error:
|
||||
return ERR_PTR(ret);
|
||||
|
||||
error_discard:
|
||||
bdi_destroy(&volume->bdi);
|
||||
error_bdi:
|
||||
up_write(¶ms->cell->vl_sem);
|
||||
|
||||
for (loop = volume->nservers - 1; loop >= 0; loop--)
|
||||
@@ -207,7 +200,6 @@ void afs_put_volume(struct afs_volume *volume)
|
||||
for (loop = volume->nservers - 1; loop >= 0; loop--)
|
||||
afs_put_server(volume->servers[loop]);
|
||||
|
||||
bdi_destroy(&volume->bdi);
|
||||
kfree(volume);
|
||||
|
||||
_leave(" [destroyed]");
|
||||
|
Reference in New Issue
Block a user