diff options
author | Wanpeng Li <wanpeng.li@linux.intel.com> | 2015-02-27 16:52:50 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-04-10 15:08:29 -0700 |
commit | 2b11a74b21b040270d19fc3b61265c75413c0dc1 (patch) | |
tree | 17f34878bbaf99ca57fff2d085173dda954b2009 /fs/f2fs/segment.c | |
parent | 2bda542d59f970b61095bd8205c6c76062f286e3 (diff) | |
download | talos-obmc-linux-2b11a74b21b040270d19fc3b61265c75413c0dc1.tar.gz talos-obmc-linux-2b11a74b21b040270d19fc3b61265c75413c0dc1.zip |
f2fs: don't need to collect dirty sit entries and flush journal when there's no dirty sit entries
Don't need to collect dirty sit entries and flush sit journal to sit
entries when there's no dirty sit entries. This patch check dirty_sentries
earlier just like flush_nat_entries.
Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 29c04edcb843..1e909340842a 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1733,6 +1733,9 @@ void flush_sit_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc) mutex_lock(&curseg->curseg_mutex); mutex_lock(&sit_i->sentry_lock); + if (!sit_i->dirty_sentries) + goto out; + /* * add and account sit entries of dirty bitmap in sit entry * set temporarily @@ -1747,9 +1750,6 @@ void flush_sit_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc) if (!__has_cursum_space(sum, sit_i->dirty_sentries, SIT_JOURNAL)) remove_sits_in_journal(sbi); - if (!sit_i->dirty_sentries) - goto out; - /* * there are two steps to flush sit entries: * #1, flush sit entries to journal in current cold data summary block. |