| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 1/3] xfs: handle errors from ->free_blocks in xfs_btree_kill_iroot |
| From: | Christoph Hellwig <hch@xxxxxx> |
| Date: | Wed, 13 Jan 2016 18:50:52 +0100 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1452707454-15229-1-git-send-email-hch@xxxxxx> |
| References: | <1452707454-15229-1-git-send-email-hch@xxxxxx> |
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
fs/xfs/libxfs/xfs_btree.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
index a0eb18c..3143577 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;
--
1.9.1
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | a couple minor btree free_block patches, Christoph Hellwig |
|---|---|
| Next by Date: | [PATCH 2/3] xfs: factor btree block freeing into a helper, Christoph Hellwig |
| Previous by Thread: | a couple minor btree free_block patches, Christoph Hellwig |
| Next by Thread: | Re: [PATCH 1/3] xfs: handle errors from ->free_blocks in xfs_btree_kill_iroot, Brian Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |