diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-09-16 15:02:33 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-09-16 15:18:51 +0200 |
commit | 32a88aa1b6dfb901cec64e1898cac78d0f25028a (patch) | |
tree | 51aa6f56ccfca53f495d015645373317bdee3647 /fs/super.c | |
parent | c4a77a6c7dcff04a2abc7fe4b6b2ae605be41c5b (diff) | |
download | lwn-32a88aa1b6dfb901cec64e1898cac78d0f25028a.tar.gz lwn-32a88aa1b6dfb901cec64e1898cac78d0f25028a.zip |
fs: Assign bdi in super_block
We do this automatically in get_sb_bdev() from the set_bdev_super()
callback. Filesystems that have their own private backing_dev_info
must assign that in ->fill_super().
Note that ->s_bdi assignment is required for proper writeback!
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/super.c b/fs/super.c index 9cda337ddae2..b03fea8fbfb6 100644 --- a/fs/super.c +++ b/fs/super.c @@ -707,6 +707,12 @@ static int set_bdev_super(struct super_block *s, void *data) { s->s_bdev = data; s->s_dev = s->s_bdev->bd_dev; + + /* + * We set the bdi here to the queue backing, file systems can + * overwrite this in ->fill_super() + */ + s->s_bdi = &bdev_get_queue(s->s_bdev)->backing_dev_info; return 0; } |