diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-06-28 01:00:41 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-17 16:23:19 -0700 |
commit | 3c9979727fa77a3a08eae5938d1ac0e4568d5997 (patch) | |
tree | fc2ebaaf63acd3f98731214b421dd197e88683b9 | |
parent | 43efa53d4ece1bee219320ce8451a5a211188375 (diff) | |
download | lwn-3c9979727fa77a3a08eae5938d1ac0e4568d5997.tar.gz lwn-3c9979727fa77a3a08eae5938d1ac0e4568d5997.zip |
f2fs: check bdi->dirty_exceeded when trying to skip data writes
commit 2743f865543c0c4a5e12fc13edb2bf89a6e9687c upstream.
If we don't check the current backing device status, balance_dirty_pages can
fall into infinite pausing routine.
This can be occurred when a lot of directories make a small number of dirty
dentry pages including files.
Reported-by: Brian Chadwick <brianchad@westnet.com.au>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/f2fs/node.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index a9c04950affd..5696bde95702 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -42,6 +42,8 @@ bool available_free_memory(struct f2fs_sb_info *sbi, int type) mem_size = (nm_i->nat_cnt * sizeof(struct nat_entry)) >> 12; res = mem_size < ((val.totalram * nm_i->ram_thresh / 100) >> 2); } else if (type == DIRTY_DENTS) { + if (sbi->sb->s_bdi->dirty_exceeded) + return false; mem_size = get_pages(sbi, F2FS_DIRTY_DENTS); res = mem_size < ((val.totalram * nm_i->ram_thresh / 100) >> 1); } |