Subject: + ocfs2-refcounttree-add-the-missing-null-check-of-the-return-value-of-find_or_create_page.patch added to -mm tree To: guz.fnst@xxxxxxxxxxxxxx,jlbec@xxxxxxxxxxxx,mfasheh@xxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Tue, 09 Jul 2013 15:22:34 -0700 The patch titled Subject: ocfs2/refcounttree: add the missing NULL check of the return value of find_or_create_page() has been added to the -mm tree. Its filename is ocfs2-refcounttree-add-the-missing-null-check-of-the-return-value-of-find_or_create_page.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ocfs2-refcounttree-add-the-missing-null-check-of-the-return-value-of-find_or_create_page.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-refcounttree-add-the-missing-null-check-of-the-return-value-of-find_or_create_page.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Gu Zheng <guz.fnst@xxxxxxxxxxxxxx> Subject: 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(). Signed-off-by: Gu Zheng <guz.fnst@xxxxxxxxxxxxxx> Acked-by: Joel Becker <jlbec@xxxxxxxxxxxx> Cc: Mark Fasheh <mfasheh@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/refcounttree.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff -puN fs/ocfs2/refcounttree.c~ocfs2-refcounttree-add-the-missing-null-check-of-the-return-value-of-find_or_create_page fs/ocfs2/refcounttree.c --- a/fs/ocfs2/refcounttree.c~ocfs2-refcounttree-add-the-missing-null-check-of-the-return-value-of-find_or_create_page +++ a/fs/ocfs2/refcounttree.c @@ -2965,7 +2965,11 @@ int ocfs2_duplicate_clusters_by_page(han 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 * can't be dirtied before we CoW it out. _ Patches currently in -mm which might be from guz.fnst@xxxxxxxxxxxxxx are origin.patch linux-next.patch ocfs2-refcounttree-add-the-missing-null-check-of-the-return-value-of-find_or_create_page.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html