diff options
author | Chao Yu <yuchao0@huawei.com> | 2019-08-23 12:58:36 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-09-07 02:18:26 +0300 |
commit | 00e09c0bccc71825ca9a659eb145ed7c4dc95588 (patch) | |
tree | 102a0fee320d40270360f9908a04d7a28a3c67da /fs/f2fs/inode.c | |
parent | b757f6edbeddd0c43135edfdee18103bd73f0991 (diff) | |
download | linux-00e09c0bccc71825ca9a659eb145ed7c4dc95588.tar.xz |
f2fs: enhance f2fs_is_checkpoint_ready()'s readability
This patch changes sematics of f2fs_is_checkpoint_ready()'s return
value as: return true when checkpoint is ready, other return false,
it can improve readability of below conditions.
f2fs_submit_page_write()
...
if (is_sbi_flag_set(sbi, SBI_IS_SHUTDOWN) ||
!f2fs_is_checkpoint_ready(sbi))
__submit_merged_bio(io);
f2fs_balance_fs()
...
if (!f2fs_is_checkpoint_ready(sbi))
return;
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r-- | fs/f2fs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 88af85e0db62..87214414936b 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -616,7 +616,7 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc) if (!is_inode_flag_set(inode, FI_DIRTY_INODE)) return 0; - if (f2fs_is_checkpoint_ready(sbi)) + if (!f2fs_is_checkpoint_ready(sbi)) return -ENOSPC; /* |