summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorTiezhu Yang <kernelpatch@126.com>2018-02-06 01:21:45 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2018-03-13 00:05:41 +0100
commit3bb09a0e7e807e2cb7a97e35d5075d0d82bd4085 (patch)
tree7e62a8052a297963d69324e3d9c846864f4afe3f /fs/f2fs
parentf2fs: fix to handle looped node chain during recovery (diff)
downloadlinux-3bb09a0e7e807e2cb7a97e35d5075d0d82bd4085.tar.xz
linux-3bb09a0e7e807e2cb7a97e35d5075d0d82bd4085.zip
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. Signed-off-by: Tiezhu Yang <kernelpatch@126.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/data.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 0dae8561addb..1c5b050ef900 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -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);