]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
f2fs: fix a wrong condition in __submit_bio
authorDehe Gu <gudehe@huawei.com>
Tue, 2 Feb 2021 09:39:22 +0000 (17:39 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Apr 2021 16:31:27 +0000 (18:31 +0200)
BugLink: https://bugs.launchpad.net/bugs/1918974
[ Upstream commit 39f71b7e40e21805d6b15fc7750bdd9cab6a5010 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
fs/f2fs/data.c

index 68be334afc286607b3b69fd3fe1b05d9dca05e24..64ee2a064e3392e0980f0fbdd359a3e949fbe22c 100644 (file)
@@ -318,7 +318,7 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
                if (test_opt(sbi, LFS) && 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;