linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/4] Ext4: use try_to_writeback_inodes_sb() instead of writeback_inodes_sb_if_idle()
@ 2012-04-26  2:58 Miao Xie
  0 siblings, 0 replies; only message in thread
From: Miao Xie @ 2012-04-26  2:58 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Linux Ext4, miaox, Linux FSDevel

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@cn.fujitsu.com>
---
 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-26  2:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-26  2:58 [PATCH 3/4] Ext4: use try_to_writeback_inodes_sb() instead of writeback_inodes_sb_if_idle() Miao Xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).