mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
f2fs: retry to revoke atomic commit in -ENOMEM case
During atomic committing, if we encounter -ENOMEM in revoke path, it's better to give a chance to retry revoking. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
afd2b4da40
commit
7f2b4e8ea5
@ -213,9 +213,15 @@ static int __revoke_inmem_pages(struct inode *inode,
|
||||
struct node_info ni;
|
||||
|
||||
trace_f2fs_commit_inmem_page(page, INMEM_REVOKE);
|
||||
|
||||
retry:
|
||||
set_new_dnode(&dn, inode, NULL, NULL, 0);
|
||||
if (get_dnode_of_data(&dn, page->index, LOOKUP_NODE)) {
|
||||
err = get_dnode_of_data(&dn, page->index, LOOKUP_NODE);
|
||||
if (err) {
|
||||
if (err == -ENOMEM) {
|
||||
congestion_wait(BLK_RW_ASYNC, HZ/50);
|
||||
cond_resched();
|
||||
goto retry;
|
||||
}
|
||||
err = -EAGAIN;
|
||||
goto next;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user