From: Jeff Layton Date: Wed, 29 Sep 2010 13:49:54 +0000 (-0400) Subject: cifs: set backing_dev_info on new S_ISREG inodes X-Git-Tag: v3.0~3212^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=522440ed55d2cc8855ea5f82bc067e0483b2e1be;p=platform%2Fkernel%2Flinux-amlogic.git 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. Cc: stable@kernel.org Acked-by: Dave Kleikamp Signed-off-by: Jeff Layton Signed-off-by: Steve French --- diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 93f77d4..53cce8c 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -801,6 +801,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;