mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
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>
This commit is contained in:
parent
d7bbecc6b8
commit
8c77bd62d6
2 changed files with 3 additions and 3 deletions
|
|
@ -985,7 +985,7 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
|
|||
loff_t psize;
|
||||
int i, err;
|
||||
|
||||
if (!f2fs_trylock_op(sbi))
|
||||
if (!IS_NOQUOTA(inode) && !f2fs_trylock_op(sbi))
|
||||
return -EAGAIN;
|
||||
|
||||
set_new_dnode(&dn, cc->inode, NULL, NULL, 0);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue