From: Miao Xie <miaoxie1984@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Linux Ext4 <linux-ext4@vger.kernel.org>,
miaox@cn.fujitsu.com,
Linux FSDevel <linux-fsdevel@vger.kernel.org>
Subject: [PATCH 3/4] Ext4: use try_to_writeback_inodes_sb() instead of writeback_inodes_sb_if_idle()
Date: Thu, 26 Apr 2012 10:58:11 +0800 [thread overview]
Message-ID: <4F98B9C3.7060809@gmail.com> (raw)
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
reply other threads:[~2012-04-26 2:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F98B9C3.7060809@gmail.com \
--to=miaoxie1984@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miaox@cn.fujitsu.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.