[PATCH 3/4] Ext4: use try_to_writeback_inodes_sb() instead of writeback_inodes_sb_if_idle()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the s_umount is write locked, then the sb is not idle. IOWs,
writeback_inodes_sb...if_idle() should be doing down_read_trylock(),
not down_read(). So use try_to_writeback_inodes_sb() instead of
writeback_inodes_sb_if_idle().

Signed-off-by: Miao Xie <miaox@xxxxxxxxxxxxxx>
---
 fs/ext4/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index c77b0bd..2dccb4d 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2380,7 +2380,7 @@ static int ext4_nonda_switch(struct super_block *sb)
 	 * start pushing delalloc when 1/2 of free blocks are dirty.
 	 */
 	if (free_blocks < 2 * dirty_blocks)
-		writeback_inodes_sb_if_idle(sb, WB_REASON_FS_FREE_SPACE);
+		try_to_writeback_inodes_sb(sb, WB_REASON_FS_FREE_SPACE);
 
 	return 0;
 }
-- 
1.7.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux