]> err.no Git - linux-2.6/commitdiff
[PATCH] write_inode_now(): write inode if not BDI_CAP_NO_WRITEBACK
authorAndrew Morton <akpm@osdl.org>
Mon, 7 Nov 2005 08:59:15 +0000 (00:59 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 7 Nov 2005 15:53:35 +0000 (07:53 -0800)
If the backing_dev_info doesn't have BDI_CAP_NO_WRITEBACK we're not supposed
to write back an inode's pages.  But in this situation write_inode_now()
refuses to write the inode itself as well.  Fix.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/fs-writeback.c

index c27f8d4098be3cd713b2934f6eefdc8d03bb4a68..1361a4a641571e891f2a13b38bcce7452367e156 100644 (file)
@@ -562,7 +562,7 @@ int write_inode_now(struct inode *inode, int sync)
        };
 
        if (!mapping_cap_writeback_dirty(inode->i_mapping))
-               return 0;
+               wbc.nr_to_write = 0;
 
        might_sleep();
        spin_lock(&inode_lock);