aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_dir2_leaf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2_leaf.c')
-rw-r--r--fs/xfs/libxfs/xfs_dir2_leaf.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2_leaf.c b/fs/xfs/libxfs/xfs_dir2_leaf.c
index 78b411bfc543..a19174eb3cb2 100644
--- a/fs/xfs/libxfs/xfs_dir2_leaf.c
+++ b/fs/xfs/libxfs/xfs_dir2_leaf.c
@@ -183,9 +183,9 @@ __read_verify(
183 183
184 if (xfs_sb_version_hascrc(&mp->m_sb) && 184 if (xfs_sb_version_hascrc(&mp->m_sb) &&
185 !xfs_buf_verify_cksum(bp, XFS_DIR3_LEAF_CRC_OFF)) 185 !xfs_buf_verify_cksum(bp, XFS_DIR3_LEAF_CRC_OFF))
186 xfs_buf_ioerror(bp, EFSBADCRC); 186 xfs_buf_ioerror(bp, -EFSBADCRC);
187 else if (!xfs_dir3_leaf_verify(bp, magic)) 187 else if (!xfs_dir3_leaf_verify(bp, magic))
188 xfs_buf_ioerror(bp, EFSCORRUPTED); 188 xfs_buf_ioerror(bp, -EFSCORRUPTED);
189 189
190 if (bp->b_error) 190 if (bp->b_error)
191 xfs_verifier_error(bp); 191 xfs_verifier_error(bp);
@@ -201,7 +201,7 @@ __write_verify(
201 struct xfs_dir3_leaf_hdr *hdr3 = bp->b_addr; 201 struct xfs_dir3_leaf_hdr *hdr3 = bp->b_addr;
202 202
203 if (!xfs_dir3_leaf_verify(bp, magic)) { 203 if (!xfs_dir3_leaf_verify(bp, magic)) {
204 xfs_buf_ioerror(bp, EFSCORRUPTED); 204 xfs_buf_ioerror(bp, -EFSCORRUPTED);
205 xfs_verifier_error(bp); 205 xfs_verifier_error(bp);
206 return; 206 return;
207 } 207 }
@@ -731,7 +731,7 @@ xfs_dir2_leaf_addname(
731 if ((args->op_flags & XFS_DA_OP_JUSTCHECK) || 731 if ((args->op_flags & XFS_DA_OP_JUSTCHECK) ||
732 args->total == 0) { 732 args->total == 0) {
733 xfs_trans_brelse(tp, lbp); 733 xfs_trans_brelse(tp, lbp);
734 return ENOSPC; 734 return -ENOSPC;
735 } 735 }
736 /* 736 /*
737 * Convert to node form. 737 * Convert to node form.
@@ -755,7 +755,7 @@ xfs_dir2_leaf_addname(
755 */ 755 */
756 if (args->op_flags & XFS_DA_OP_JUSTCHECK) { 756 if (args->op_flags & XFS_DA_OP_JUSTCHECK) {
757 xfs_trans_brelse(tp, lbp); 757 xfs_trans_brelse(tp, lbp);
758 return use_block == -1 ? ENOSPC : 0; 758 return use_block == -1 ? -ENOSPC : 0;
759 } 759 }
760 /* 760 /*
761 * If no allocations are allowed, return now before we've 761 * If no allocations are allowed, return now before we've
@@ -763,7 +763,7 @@ xfs_dir2_leaf_addname(
763 */ 763 */
764 if (args->total == 0 && use_block == -1) { 764 if (args->total == 0 && use_block == -1) {
765 xfs_trans_brelse(tp, lbp); 765 xfs_trans_brelse(tp, lbp);
766 return ENOSPC; 766 return -ENOSPC;
767 } 767 }
768 /* 768 /*
769 * Need to compact the leaf entries, removing stale ones. 769 * Need to compact the leaf entries, removing stale ones.
@@ -1327,13 +1327,13 @@ xfs_dir2_leaf_lookup_int(
1327 return 0; 1327 return 0;
1328 } 1328 }
1329 /* 1329 /*
1330 * No match found, return ENOENT. 1330 * No match found, return -ENOENT.
1331 */ 1331 */
1332 ASSERT(cidb == -1); 1332 ASSERT(cidb == -1);
1333 if (dbp) 1333 if (dbp)
1334 xfs_trans_brelse(tp, dbp); 1334 xfs_trans_brelse(tp, dbp);
1335 xfs_trans_brelse(tp, lbp); 1335 xfs_trans_brelse(tp, lbp);
1336 return ENOENT; 1336 return -ENOENT;
1337} 1337}
1338 1338
1339/* 1339/*
@@ -1440,7 +1440,7 @@ xfs_dir2_leaf_removename(
1440 * Just go on, returning success, leaving the 1440 * Just go on, returning success, leaving the
1441 * empty block in place. 1441 * empty block in place.
1442 */ 1442 */
1443 if (error == ENOSPC && args->total == 0) 1443 if (error == -ENOSPC && args->total == 0)
1444 error = 0; 1444 error = 0;
1445 xfs_dir3_leaf_check(dp, lbp); 1445 xfs_dir3_leaf_check(dp, lbp);
1446 return error; 1446 return error;
@@ -1641,7 +1641,7 @@ xfs_dir2_leaf_trim_data(
1641 * Get rid of the data block. 1641 * Get rid of the data block.
1642 */ 1642 */
1643 if ((error = xfs_dir2_shrink_inode(args, db, dbp))) { 1643 if ((error = xfs_dir2_shrink_inode(args, db, dbp))) {
1644 ASSERT(error != ENOSPC); 1644 ASSERT(error != -ENOSPC);
1645 xfs_trans_brelse(tp, dbp); 1645 xfs_trans_brelse(tp, dbp);
1646 return error; 1646 return error;
1647 } 1647 }
@@ -1815,7 +1815,7 @@ xfs_dir2_node_to_leaf(
1815 * punching out the middle of an extent, and this is an 1815 * punching out the middle of an extent, and this is an
1816 * isolated block. 1816 * isolated block.
1817 */ 1817 */
1818 ASSERT(error != ENOSPC); 1818 ASSERT(error != -ENOSPC);
1819 return error; 1819 return error;
1820 } 1820 }
1821 fbp = NULL; 1821 fbp = NULL;