]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/xfs/libxfs/xfs_refcount.c
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
[linux.git] / fs / xfs / libxfs / xfs_refcount.c
index 900ea231f9a3d3d0e8bbbf9bb0f43e24f342f3e2..45b1c3b4e047b1682ded2e0aca55f7160163986e 100644 (file)
@@ -1638,6 +1638,10 @@ xfs_refcount_recover_cow_leftovers(
        error = xfs_alloc_read_agf(mp, tp, agno, 0, &agbp);
        if (error)
                goto out_trans;
+       if (!agbp) {
+               error = -ENOMEM;
+               goto out_trans;
+       }
        cur = xfs_refcountbt_init_cursor(mp, tp, agbp, agno, NULL);
 
        /* Find all the leftover CoW staging extents. */