cifs: set backing_dev_info on new S_ISREG inodes
Subsystems (3)
PATCH 1/1 cifs: set backing_dev_info on new S_ISREG inodes
Testing on very recent kernel (2.6.36-rc6) made this warning pop:
WARNING: at fs/fs-writeback.c:87 inode_to_bdi+0x65/0x70()
Hardware name:
Dirtiable inode bdi default != sb bdi cifs...the following patch fixes it and seems to be the obviously correct thing to do for cifs.
--- fs/cifs/inode.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
fs/cifs/inode.c +2 -0
@@ -853,6 +853,8 @@ retry_iget5_locked: inode->i_flags |=S_NOATIME |S_NOCMTIME ;if (inode->i_state &I_NEW ) { inode->i_ino = hash; +if (S_ISREG (inode->i_mode)) + inode->i_data.backing_dev_info = sb->s_bdi;#ifdef CONFIG_CIFS_FSCACHE /* initialize per-inode cache cookie pointer */ CIFS_I (inode)->fscache =NULL ;
Signature · 1 line
1.7.2.3
Quoted 8 lines · Jeff Layton
Testing on very recent kernel (2.6.36-rc6) made this warning pop:
WARNING: at fs/fs-writeback.c:87 inode_to_bdi+0x65/0x70() Hardware name: Dirtiable inode bdi default != sb bdi cifs...the following patch fixes it and seems to be the obviously correct thing to do for cifs.
See my patch in the btrfs/default_backing_dev_info thread for the real fix for the underlying issue. But your patch won't harm either way.
Quoted 7 lines · On Wed, 29 Sep 2010 19:17:30 -0400 Christoph Hellwig…
Quoted 6 lines · Jeff Layton
Testing on very recent kernel (2.6.36-rc6) made this warning pop:
WARNING: at fs/fs-writeback.c:87 inode_to_bdi+0x65/0x70() Hardware name: Dirtiable inode bdi default != sb bdi cifs
Quoted 6 lines
Quoted 2 lines
...the following patch fixes it and seems to be the obviously correct thing to do for cifs.
See my patch in the btrfs/default_backing_dev_info thread for the real fix for the underlying issue. But your patch won't harm either way.
Thanks Christoph. I looked to NFS as a model for this, which does a very similar thing in nfs_fhget. It's probably reasonable for us to set this here in case there is further churn in the VFS for this sort of thing.
Signature · 1 line
Jeff Layton <[email protected]>