From 6453ee7cfd26e9daa28566690b11d9781b621ec6 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 22 Apr 2010 12:12:40 +0200 Subject: [PATCH] --- yaml --- r: 190333 b: refs/heads/master c: 5163d90076729413cb882d3dd5c3d3cfb5b9f035 h: refs/heads/master i: 190331: d19a3a347a6f451dae54186f602a2d3785d8a872 v: v3 --- [refs] | 2 +- trunk/fs/coda/inode.c | 8 ++++++++ trunk/include/linux/coda_psdev.h | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index bbc207e36477..2bdb0c763f68 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8044f7f468469c80031611206d554f86fcdfe704 +refs/heads/master: 5163d90076729413cb882d3dd5c3d3cfb5b9f035 diff --git a/trunk/fs/coda/inode.c b/trunk/fs/coda/inode.c index a1695dcadd99..d97f9935a028 100644 --- a/trunk/fs/coda/inode.c +++ b/trunk/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; diff --git a/trunk/include/linux/coda_psdev.h b/trunk/include/linux/coda_psdev.h index 5b5d4731f956..644062e8d857 100644 --- a/trunk/include/linux/coda_psdev.h +++ b/trunk/include/linux/coda_psdev.h @@ -1,6 +1,7 @@ #ifndef __CODA_PSDEV_H #define __CODA_PSDEV_H +#include #include #define CODA_PSDEV_MAJOR 67 @@ -17,6 +18,7 @@ struct venus_comm { struct list_head vc_processing; int vc_inuse; struct super_block *vc_sb; + struct backing_dev_info bdi; };