aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
authorGravatar Jaegeuk Kim <jaegeuk@kernel.org> 2020-04-09 10:25:21 -0700
committerGravatar Jaegeuk Kim <jaegeuk@kernel.org> 2020-04-23 20:34:15 -0700
commit435cbab95e3966cd8310addd9e9b758dce0e8b84 (patch)
treebf6d91500d7015a342053295963ab1a7834e17cb /fs/f2fs/data.c
parentf2fs: support read iostat (diff)
downloadlinux-435cbab95e3966cd8310addd9e9b758dce0e8b84.tar.gz
linux-435cbab95e3966cd8310addd9e9b758dce0e8b84.tar.bz2
linux-435cbab95e3966cd8310addd9e9b758dce0e8b84.zip
f2fs: fix quota_sync failure due to f2fs_lock_op
f2fs_quota_sync() uses f2fs_lock_op() before flushing dirty pages, but f2fs_write_data_page() returns EAGAIN. Likewise dentry blocks, we can just bypass getting the lock, since quota blocks are also maintained by checkpoint. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r--fs/f2fs/data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 199877cb57fe..a5505aba2a1f 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -2659,8 +2659,8 @@ write:
f2fs_available_free_memory(sbi, BASE_CHECK))))
goto redirty_out;
- /* Dentry blocks are controlled by checkpoint */
- if (S_ISDIR(inode->i_mode)) {
+ /* Dentry/quota blocks are controlled by checkpoint */
+ if (S_ISDIR(inode->i_mode) || IS_NOQUOTA(inode)) {
fio.need_lock = LOCK_DONE;
err = f2fs_do_write_data_page(&fio);
goto done;