[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210816132248.276865-1-frank.li@vivo.com>
Date: Mon, 16 Aug 2021 21:22:48 +0800
From: Yangtao Li <frank.li@...o.com>
To: jaegeuk@...nel.org, chao@...nel.org
Cc: linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, Yangtao Li <frank.li@...o.com>
Subject: [PATCH] f2fs: always call f2fs_issue_checkpoint() in f2fs_sync_fs()
Sync is always 1, so delete the check of the value.
Signed-off-by: Yangtao Li <frank.li@...o.com>
---
fs/f2fs/super.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 98727e04d271..b823c7e3f303 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1553,7 +1553,6 @@ static void f2fs_put_super(struct super_block *sb)
int f2fs_sync_fs(struct super_block *sb, int sync)
{
struct f2fs_sb_info *sbi = F2FS_SB(sb);
- int err = 0;
if (unlikely(f2fs_cp_error(sbi)))
return 0;
@@ -1565,10 +1564,7 @@ int f2fs_sync_fs(struct super_block *sb, int sync)
if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING)))
return -EAGAIN;
- if (sync)
- err = f2fs_issue_checkpoint(sbi);
-
- return err;
+ return f2fs_issue_checkpoint(sbi);
}
static int f2fs_freeze(struct super_block *sb)
--
2.32.0
Powered by blists - more mailing lists