Skip to contentSkip to conversation

f2fs: remove redundant check of page type when submit bio

PATCH In review Tiezhu Yang 2 participants 2 messages Feb 6, 2018 – Feb 7, 2018 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs: remove redundant check of page type when submit bio

This patch removes redundant check of page type when submit bio to make the logic more clear.

---
 fs/f2fs/data.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
fs/f2fs/data.c +3 -4
index 7435830..55f5e8d 100644
@@ -203,13 +203,12 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
 	if (!is_read_io(bio_op(bio))) {
 		unsigned int start;
 
-		if (f2fs_sb_mounted_blkzoned(sbi->sb) &&
-			current->plug && (type == DATA || type == NODE))
-			blk_finish_plug(current->plug);
-
 		if (type != DATA && type != NODE)
 			goto submit_io;
 
+		if (f2fs_sb_mounted_blkzoned(sbi->sb) && current->plug)
+			blk_finish_plug(current->plug);
+
 		start = bio->bi_iter.bi_size >> F2FS_BLKSIZE_BITS;
 		start %= F2FS_IO_SIZE(sbi);
 
Signature · 4 lines
1.8.3.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot