diff options
author | Christoph Hellwig <hch@lst.de> | 2016-02-08 14:58:07 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-02-08 14:58:07 +1100 |
commit | 196328ec973a74ee52cc282824e72c3824dc1cf5 (patch) | |
tree | 1b950c9ded21a43326d2e5427ccc22d4f54fcadd /fs/xfs/libxfs/xfs_btree.c | |
parent | 36f90b0a2ddd60823fe193a85e60ff1906c2a9b3 (diff) | |
download | linux-196328ec973a74ee52cc282824e72c3824dc1cf5.tar.bz2 |
xfs: handle errors from ->free_blocks in xfs_btree_kill_iroot
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_btree.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c index a0eb18ce3ad3..3143577930bd 100644 --- a/fs/xfs/libxfs/xfs_btree.c +++ b/fs/xfs/libxfs/xfs_btree.c @@ -3209,6 +3209,7 @@ xfs_btree_kill_iroot( int level; int index; int numrecs; + int error; #ifdef DEBUG union xfs_btree_ptr ptr; int i; @@ -3272,8 +3273,6 @@ xfs_btree_kill_iroot( cpp = xfs_btree_ptr_addr(cur, 1, cblock); #ifdef DEBUG for (i = 0; i < numrecs; i++) { - int error; - error = xfs_btree_check_ptr(cur, cpp, i, level - 1); if (error) { XFS_BTREE_TRACE_CURSOR(cur, XBT_ERROR); @@ -3283,7 +3282,11 @@ xfs_btree_kill_iroot( #endif xfs_btree_copy_ptrs(cur, pp, cpp, numrecs); - cur->bc_ops->free_block(cur, cbp); + error = cur->bc_ops->free_block(cur, cbp); + if (error) { + XFS_BTREE_TRACE_CURSOR(cur, XBT_ERROR); + return error; + } XFS_BTREE_STATS_INC(cur, free); cur->bc_bufs[level - 1] = NULL; |