diff options
author | Jan Kara <jack@suse.cz> | 2017-04-12 13:24:34 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-04-20 21:09:55 +0300 |
commit | 851ea0860986961f32774e34753ad80e5fd545a1 (patch) | |
tree | 4f7cc8ab9a751cb2a35d981686ee1fbb6efc98ff /fs/cifs/cifsfs.c | |
parent | 09dc9fc24ba714a6d29349e49ec616edcb3ce560 (diff) | |
download | linux-851ea0860986961f32774e34753ad80e5fd545a1.tar.xz |
cifs: Convert to separately allocated bdi
Allocate struct backing_dev_info separately instead of embedding it
inside superblock. This unifies handling of bdi among users.
CC: Steve French <sfrench@samba.org>
CC: linux-cifs@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 15e1db8738ae..502eab6bdbc4 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -138,7 +138,12 @@ cifs_read_super(struct super_block *sb) sb->s_magic = CIFS_MAGIC_NUMBER; sb->s_op = &cifs_super_ops; sb->s_xattr = cifs_xattr_handlers; - sb->s_bdi = &cifs_sb->bdi; + rc = super_setup_bdi(sb); + if (rc) + goto out_no_root; + /* tune readahead according to rsize */ + sb->s_bdi->ra_pages = cifs_sb->rsize / PAGE_SIZE; + sb->s_blocksize = CIFS_MAX_MSGSIZE; sb->s_blocksize_bits = 14; /* default 2**14 = CIFS_MAX_MSGSIZE */ inode = cifs_root_iget(sb); |