]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - fs/ocfs2/refcounttree.c
Merge tag 'spi-v3.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
[linux-imx.git] / fs / ocfs2 / refcounttree.c
index 998b17eda09d807b2b1d2ccc0b94cdc2a45974a1..9f6b96a09615bcc243b81ebc5cf3c9139c2deec3 100644 (file)
@@ -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