f2fs: fix a wrong condition in __submit_bio
authorDehe Gu <gudehe@huawei.com>
Tue, 2 Feb 2021 09:39:22 +0000 (17:39 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 2 Feb 2021 17:14:27 +0000 (09:14 -0800)
We should use !F2FS_IO_ALIGNED() to check and submit_io directly.

Fixes: 8223ecc456d0 ("f2fs: fix to add missing F2FS_IO_ALIGNED() condition")
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Dehe Gu <gudehe@huawei.com>
Signed-off-by: Ge Qiu <qiuge@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c

index 38476d0..1ee966a 100644 (file)
@@ -470,7 +470,7 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
                if (f2fs_lfs_mode(sbi) && current->plug)
                        blk_finish_plug(current->plug);
 
-               if (F2FS_IO_ALIGNED(sbi))
+               if (!F2FS_IO_ALIGNED(sbi))
                        goto submit_io;
 
                start = bio->bi_iter.bi_size >> F2FS_BLKSIZE_BITS;