xfs: dont ignore error code from xfs_bmbt_update
authorChristoph Hellwig <hch@infradead.org>
Sun, 18 Sep 2011 20:41:06 +0000 (20:41 +0000)
committerAlex Elder <aelder@sgi.com>
Wed, 12 Oct 2011 02:15:07 +0000 (21:15 -0500)
Fix a case in xfs_bmap_add_extent_unwritten_real where we aren't
passing the returned error on.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/xfs_bmap.c

index 2b31945ce9fe54acc59007c5c75c6d09a13bd654..bb31d37bf49b0c62114a6aa890eceea42fbc16a5 100644 (file)
@@ -1217,10 +1217,11 @@ xfs_bmap_add_extent_unwritten_real(
                                goto done;
                        if ((error = xfs_btree_decrement(cur, 0, &i)))
                                goto done;
-                       if (xfs_bmbt_update(cur, LEFT.br_startoff,
+                       error = xfs_bmbt_update(cur, LEFT.br_startoff,
                                LEFT.br_startblock,
                                LEFT.br_blockcount + new->br_blockcount,
-                               LEFT.br_state))
+                               LEFT.br_state);
+                       if (error)
                                goto done;
                }
                break;