aboutsummaryrefslogtreecommitdiffstats
path: root/fs/coda/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/coda/inode.c')
-rw-r--r--fs/coda/inode.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/coda/inode.c b/fs/coda/inode.c
index 830f51abb971..d97f9935a028 100644
--- a/fs/coda/inode.c
+++ b/fs/coda/inode.c
@@ -18,6 +18,7 @@
18#include <linux/smp_lock.h> 18#include <linux/smp_lock.h>
19#include <linux/file.h> 19#include <linux/file.h>
20#include <linux/vfs.h> 20#include <linux/vfs.h>
21#include <linux/slab.h>
21 22
22#include <asm/system.h> 23#include <asm/system.h>
23#include <asm/uaccess.h> 24#include <asm/uaccess.h>
@@ -166,6 +167,10 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
166 return -EBUSY; 167 return -EBUSY;
167 } 168 }
168 169
170 error = bdi_setup_and_register(&vc->bdi, "coda", BDI_CAP_MAP_COPY);
171 if (error)
172 goto bdi_err;
173
169 vc->vc_sb = sb; 174 vc->vc_sb = sb;
170 175
171 sb->s_fs_info = vc; 176 sb->s_fs_info = vc;
@@ -174,6 +179,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
174 sb->s_blocksize_bits = 12; 179 sb->s_blocksize_bits = 12;
175 sb->s_magic = CODA_SUPER_MAGIC; 180 sb->s_magic = CODA_SUPER_MAGIC;
176 sb->s_op = &coda_super_operations; 181 sb->s_op = &coda_super_operations;
182 sb->s_bdi = &vc->bdi;
177 183
178 /* get root fid from Venus: this needs the root inode */ 184 /* get root fid from Venus: this needs the root inode */
179 error = venus_rootfid(sb, &fid); 185 error = venus_rootfid(sb, &fid);
@@ -199,6 +205,8 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
199 return 0; 205 return 0;
200 206
201 error: 207 error:
208 bdi_destroy(&vc->bdi);
209 bdi_err:
202 if (root) 210 if (root)
203 iput(root); 211 iput(root);
204 if (vc) 212 if (vc)
@@ -209,6 +217,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
209 217
210static void coda_put_super(struct super_block *sb) 218static void coda_put_super(struct super_block *sb)
211{ 219{
220 bdi_destroy(&coda_vcp(sb)->bdi);
212 coda_vcp(sb)->vc_sb = NULL; 221 coda_vcp(sb)->vc_sb = NULL;
213 sb->s_fs_info = NULL; 222 sb->s_fs_info = NULL;
214 223