X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fcoda%2Finode.c;h=d97f9935a0285ea150f885cb7609b65b4eccc41f;hb=347815fcc63ac4c4a975bf3ca2c889c2f843ae0d;hp=a1695dcadd999b981b7da03d6226c148a90a46d0;hpb=923125c6503efd3b8779e0df9ec5fcac6acda0b4;p=~andy%2Flinux diff --git a/fs/coda/inode.c b/fs/coda/inode.c index a1695dcadd9..d97f9935a02 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c @@ -167,6 +167,10 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) return -EBUSY; } + error = bdi_setup_and_register(&vc->bdi, "coda", BDI_CAP_MAP_COPY); + if (error) + goto bdi_err; + vc->vc_sb = sb; sb->s_fs_info = vc; @@ -175,6 +179,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) sb->s_blocksize_bits = 12; sb->s_magic = CODA_SUPER_MAGIC; sb->s_op = &coda_super_operations; + sb->s_bdi = &vc->bdi; /* get root fid from Venus: this needs the root inode */ error = venus_rootfid(sb, &fid); @@ -200,6 +205,8 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) return 0; error: + bdi_destroy(&vc->bdi); + bdi_err: if (root) iput(root); if (vc) @@ -210,6 +217,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) static void coda_put_super(struct super_block *sb) { + bdi_destroy(&coda_vcp(sb)->bdi); coda_vcp(sb)->vc_sb = NULL; sb->s_fs_info = NULL;