summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-04-12 06:24:38 -0400
committerJens Axboe <axboe@fb.com>2017-04-20 14:09:55 -0400
commita5695a79088653c73c92ae8d48658cbc49f31884 (patch)
tree01efd4d7b1eb8d0bd8ebee1c357b3756c4eb7384 /fs
parentfa06052d637bf3a76f18cd2304048b866af4096e (diff)
coda: 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: Jan Harkes <jaharkes@cs.cmu.edu> CC: coda@cs.cmu.edu CC: codalist@coda.cs.cmu.edu Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/coda/inode.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/coda/inode.c b/fs/coda/inode.c
index 2dea594da199..6058df380cc0 100644
--- a/fs/coda/inode.c
+++ b/fs/coda/inode.c
@@ -183,10 +183,6 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
183 goto unlock_out; 183 goto unlock_out;
184 } 184 }
185 185
186 error = bdi_setup_and_register(&vc->bdi, "coda");
187 if (error)
188 goto unlock_out;
189
190 vc->vc_sb = sb; 186 vc->vc_sb = sb;
191 mutex_unlock(&vc->vc_mutex); 187 mutex_unlock(&vc->vc_mutex);
192 188
@@ -197,7 +193,10 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
197 sb->s_magic = CODA_SUPER_MAGIC; 193 sb->s_magic = CODA_SUPER_MAGIC;
198 sb->s_op = &coda_super_operations; 194 sb->s_op = &coda_super_operations;
199 sb->s_d_op = &coda_dentry_operations; 195 sb->s_d_op = &coda_dentry_operations;
200 sb->s_bdi = &vc->bdi; 196
197 error = super_setup_bdi(sb);
198 if (error)
199 goto error;
201 200
202 /* get root fid from Venus: this needs the root inode */ 201 /* get root fid from Venus: this needs the root inode */
203 error = venus_rootfid(sb, &fid); 202 error = venus_rootfid(sb, &fid);
@@ -228,7 +227,6 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
228 227
229error: 228error:
230 mutex_lock(&vc->vc_mutex); 229 mutex_lock(&vc->vc_mutex);
231 bdi_destroy(&vc->bdi);
232 vc->vc_sb = NULL; 230 vc->vc_sb = NULL;
233 sb->s_fs_info = NULL; 231 sb->s_fs_info = NULL;
234unlock_out: 232unlock_out:
@@ -240,7 +238,6 @@ static void coda_put_super(struct super_block *sb)
240{ 238{
241 struct venus_comm *vcp = coda_vcp(sb); 239 struct venus_comm *vcp = coda_vcp(sb);
242 mutex_lock(&vcp->vc_mutex); 240 mutex_lock(&vcp->vc_mutex);
243 bdi_destroy(&vcp->bdi);
244 vcp->vc_sb = NULL; 241 vcp->vc_sb = NULL;
245 sb->s_fs_info = NULL; 242 sb->s_fs_info = NULL;
246 mutex_unlock(&vcp->vc_mutex); 243 mutex_unlock(&vcp->vc_mutex);