aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGu Zheng <guz.fnst@cn.fujitsu.com>2013-07-31 16:53:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-31 17:41:02 -0400
commit62c610460d73fcfa5637cb497c6923ef1c42b12d (patch)
tree4bd1f444e4f1b15cb9d18e94bf1dfb4749c1e5aa
parent3964acd0dbec123aa0a621973a2a0580034b4788 (diff)
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>
-rw-r--r--fs/ocfs2/refcounttree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index 998b17eda09d..9f6b96a09615 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -2965,6 +2965,11 @@ int ocfs2_duplicate_clusters_by_page(handle_t *handle,
2965 to = map_end & (PAGE_CACHE_SIZE - 1); 2965 to = map_end & (PAGE_CACHE_SIZE - 1);
2966 2966
2967 page = find_or_create_page(mapping, page_index, GFP_NOFS); 2967 page = find_or_create_page(mapping, page_index, GFP_NOFS);
2968 if (!page) {
2969 ret = -ENOMEM;
2970 mlog_errno(ret);
2971 break;
2972 }
2968 2973
2969 /* 2974 /*
2970 * In case PAGE_CACHE_SIZE <= CLUSTER_SIZE, This page 2975 * In case PAGE_CACHE_SIZE <= CLUSTER_SIZE, This page