aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/coda/inode.c8
-rw-r--r--include/linux/coda_psdev.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/fs/coda/inode.c b/fs/coda/inode.c
index a1695dcadd99..d97f9935a028 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)
167 return -EBUSY; 167 return -EBUSY;
168 } 168 }
169 169
170 error = bdi_setup_and_register(&vc->bdi, "coda", BDI_CAP_MAP_COPY);
171 if (error)
172 goto bdi_err;
173
170 vc->vc_sb = sb; 174 vc->vc_sb = sb;
171 175
172 sb->s_fs_info = vc; 176 sb->s_fs_info = vc;
@@ -175,6 +179,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
175 sb->s_blocksize_bits = 12; 179 sb->s_blocksize_bits = 12;
176 sb->s_magic = CODA_SUPER_MAGIC; 180 sb->s_magic = CODA_SUPER_MAGIC;
177 sb->s_op = &coda_super_operations; 181 sb->s_op = &coda_super_operations;
182 sb->s_bdi = &vc->bdi;
178 183
179 /* get root fid from Venus: this needs the root inode */ 184 /* get root fid from Venus: this needs the root inode */
180 error = venus_rootfid(sb, &fid); 185 error = venus_rootfid(sb, &fid);
@@ -200,6 +205,8 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
200 return 0; 205 return 0;
201 206
202 error: 207 error:
208 bdi_destroy(&vc->bdi);
209 bdi_err:
203 if (root) 210 if (root)
204 iput(root); 211 iput(root);
205 if (vc) 212 if (vc)
@@ -210,6 +217,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
210 217
211static void coda_put_super(struct super_block *sb) 218static void coda_put_super(struct super_block *sb)
212{ 219{
220 bdi_destroy(&coda_vcp(sb)->bdi);
213 coda_vcp(sb)->vc_sb = NULL; 221 coda_vcp(sb)->vc_sb = NULL;
214 sb->s_fs_info = NULL; 222 sb->s_fs_info = NULL;
215 223
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
index 5b5d4731f956..644062e8d857 100644
--- a/include/linux/coda_psdev.h
+++ b/include/linux/coda_psdev.h
@@ -1,6 +1,7 @@
1#ifndef __CODA_PSDEV_H 1#ifndef __CODA_PSDEV_H
2#define __CODA_PSDEV_H 2#define __CODA_PSDEV_H
3 3
4#include <linux/backing-dev.h>
4#include <linux/magic.h> 5#include <linux/magic.h>
5 6
6#define CODA_PSDEV_MAJOR 67 7#define CODA_PSDEV_MAJOR 67
@@ -17,6 +18,7 @@ struct venus_comm {
17 struct list_head vc_processing; 18 struct list_head vc_processing;
18 int vc_inuse; 19 int vc_inuse;
19 struct super_block *vc_sb; 20 struct super_block *vc_sb;
21 struct backing_dev_info bdi;
20}; 22};
21 23
22 24