mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 10:50:53 +07:00
ocfs2/refcounttree: add the missing NULL check of the return value of find_or_create_page()
Add the missing NULL check of the return value of find_or_create_page() in function ocfs2_duplicate_clusters_by_page(). [akpm@linux-foundation.org: fix layout, per Joel] Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Acked-by: Joel Becker <jlbec@evilplan.org> Cc: Mark Fasheh <mfasheh@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
3964acd0db
commit
62c610460d
@ -2965,6 +2965,11 @@ int ocfs2_duplicate_clusters_by_page(handle_t *handle,
|
||||
to = map_end & (PAGE_CACHE_SIZE - 1);
|
||||
|
||||
page = find_or_create_page(mapping, page_index, GFP_NOFS);
|
||||
if (!page) {
|
||||
ret = -ENOMEM;
|
||||
mlog_errno(ret);
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* In case PAGE_CACHE_SIZE <= CLUSTER_SIZE, This page
|
||||
|
Loading…
Reference in New Issue
Block a user