Skip to content
Snippets Groups Projects
Commit 7f2b4e8e authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

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: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent afd2b4da
No related branches found
No related tags found
No related merge requests found
...@@ -213,9 +213,15 @@ static int __revoke_inmem_pages(struct inode *inode, ...@@ -213,9 +213,15 @@ static int __revoke_inmem_pages(struct inode *inode,
struct node_info ni; struct node_info ni;
trace_f2fs_commit_inmem_page(page, INMEM_REVOKE); trace_f2fs_commit_inmem_page(page, INMEM_REVOKE);
retry:
set_new_dnode(&dn, inode, NULL, NULL, 0); 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; err = -EAGAIN;
goto next; goto next;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment