aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_da_btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_da_btree.c')
-rw-r--r--fs/xfs/xfs_da_btree.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c
index 0b8b2a13cd24..20bf8e8002d6 100644
--- a/fs/xfs/xfs_da_btree.c
+++ b/fs/xfs/xfs_da_btree.c
@@ -27,8 +27,8 @@
27#include "xfs_mount.h" 27#include "xfs_mount.h"
28#include "xfs_da_btree.h" 28#include "xfs_da_btree.h"
29#include "xfs_bmap_btree.h" 29#include "xfs_bmap_btree.h"
30#include "xfs_dir2.h"
31#include "xfs_dir2_format.h" 30#include "xfs_dir2_format.h"
31#include "xfs_dir2.h"
32#include "xfs_dir2_priv.h" 32#include "xfs_dir2_priv.h"
33#include "xfs_dinode.h" 33#include "xfs_dinode.h"
34#include "xfs_inode.h" 34#include "xfs_inode.h"
@@ -399,7 +399,7 @@ xfs_da3_split(
399 struct xfs_da_intnode *node; 399 struct xfs_da_intnode *node;
400 struct xfs_buf *bp; 400 struct xfs_buf *bp;
401 int max; 401 int max;
402 int action; 402 int action = 0;
403 int error; 403 int error;
404 int i; 404 int i;
405 405
@@ -635,6 +635,7 @@ xfs_da3_root_split(
635 xfs_trans_log_buf(tp, bp, 0, size - 1); 635 xfs_trans_log_buf(tp, bp, 0, size - 1);
636 636
637 bp->b_ops = blk1->bp->b_ops; 637 bp->b_ops = blk1->bp->b_ops;
638 xfs_trans_buf_copy_type(bp, blk1->bp);
638 blk1->bp = bp; 639 blk1->bp = bp;
639 blk1->blkno = blkno; 640 blk1->blkno = blkno;
640 641
@@ -1223,6 +1224,7 @@ xfs_da3_node_toosmall(
1223 /* start with smaller blk num */ 1224 /* start with smaller blk num */
1224 forward = nodehdr.forw < nodehdr.back; 1225 forward = nodehdr.forw < nodehdr.back;
1225 for (i = 0; i < 2; forward = !forward, i++) { 1226 for (i = 0; i < 2; forward = !forward, i++) {
1227 struct xfs_da3_icnode_hdr thdr;
1226 if (forward) 1228 if (forward)
1227 blkno = nodehdr.forw; 1229 blkno = nodehdr.forw;
1228 else 1230 else
@@ -1235,10 +1237,10 @@ xfs_da3_node_toosmall(
1235 return(error); 1237 return(error);
1236 1238
1237 node = bp->b_addr; 1239 node = bp->b_addr;
1238 xfs_da3_node_hdr_from_disk(&nodehdr, node); 1240 xfs_da3_node_hdr_from_disk(&thdr, node);
1239 xfs_trans_brelse(state->args->trans, bp); 1241 xfs_trans_brelse(state->args->trans, bp);
1240 1242
1241 if (count - nodehdr.count >= 0) 1243 if (count - thdr.count >= 0)
1242 break; /* fits with at least 25% to spare */ 1244 break; /* fits with at least 25% to spare */
1243 } 1245 }
1244 if (i >= 2) { 1246 if (i >= 2) {
@@ -2454,9 +2456,9 @@ static int
2454xfs_buf_map_from_irec( 2456xfs_buf_map_from_irec(
2455 struct xfs_mount *mp, 2457 struct xfs_mount *mp,
2456 struct xfs_buf_map **mapp, 2458 struct xfs_buf_map **mapp,
2457 unsigned int *nmaps, 2459 int *nmaps,
2458 struct xfs_bmbt_irec *irecs, 2460 struct xfs_bmbt_irec *irecs,
2459 unsigned int nirecs) 2461 int nirecs)
2460{ 2462{
2461 struct xfs_buf_map *map; 2463 struct xfs_buf_map *map;
2462 int i; 2464 int i;