aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ialloc_btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_ialloc_btree.c')
-rw-r--r--fs/xfs/xfs_ialloc_btree.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c
index c282a9af5393..16921f55c542 100644
--- a/fs/xfs/xfs_ialloc_btree.c
+++ b/fs/xfs/xfs_ialloc_btree.c
@@ -24,14 +24,10 @@
24#include "xfs_trans.h" 24#include "xfs_trans.h"
25#include "xfs_sb.h" 25#include "xfs_sb.h"
26#include "xfs_ag.h" 26#include "xfs_ag.h"
27#include "xfs_dir2.h"
28#include "xfs_dmapi.h"
29#include "xfs_mount.h" 27#include "xfs_mount.h"
30#include "xfs_bmap_btree.h" 28#include "xfs_bmap_btree.h"
31#include "xfs_alloc_btree.h" 29#include "xfs_alloc_btree.h"
32#include "xfs_ialloc_btree.h" 30#include "xfs_ialloc_btree.h"
33#include "xfs_dir2_sf.h"
34#include "xfs_attr_sf.h"
35#include "xfs_dinode.h" 31#include "xfs_dinode.h"
36#include "xfs_inode.h" 32#include "xfs_inode.h"
37#include "xfs_btree.h" 33#include "xfs_btree.h"
@@ -187,38 +183,6 @@ xfs_inobt_key_diff(
187 cur->bc_rec.i.ir_startino; 183 cur->bc_rec.i.ir_startino;
188} 184}
189 185
190STATIC int
191xfs_inobt_kill_root(
192 struct xfs_btree_cur *cur,
193 struct xfs_buf *bp,
194 int level,
195 union xfs_btree_ptr *newroot)
196{
197 int error;
198
199 XFS_BTREE_TRACE_CURSOR(cur, XBT_ENTRY);
200 XFS_BTREE_STATS_INC(cur, killroot);
201
202 /*
203 * Update the root pointer, decreasing the level by 1 and then
204 * free the old root.
205 */
206 xfs_inobt_set_root(cur, newroot, -1);
207 error = xfs_inobt_free_block(cur, bp);
208 if (error) {
209 XFS_BTREE_TRACE_CURSOR(cur, XBT_ERROR);
210 return error;
211 }
212
213 XFS_BTREE_STATS_INC(cur, free);
214
215 cur->bc_bufs[level] = NULL;
216 cur->bc_nlevels--;
217
218 XFS_BTREE_TRACE_CURSOR(cur, XBT_EXIT);
219 return 0;
220}
221
222#ifdef DEBUG 186#ifdef DEBUG
223STATIC int 187STATIC int
224xfs_inobt_keys_inorder( 188xfs_inobt_keys_inorder(
@@ -313,7 +277,6 @@ static const struct xfs_btree_ops xfs_inobt_ops = {
313 277
314 .dup_cursor = xfs_inobt_dup_cursor, 278 .dup_cursor = xfs_inobt_dup_cursor,
315 .set_root = xfs_inobt_set_root, 279 .set_root = xfs_inobt_set_root,
316 .kill_root = xfs_inobt_kill_root,
317 .alloc_block = xfs_inobt_alloc_block, 280 .alloc_block = xfs_inobt_alloc_block,
318 .free_block = xfs_inobt_free_block, 281 .free_block = xfs_inobt_free_block,
319 .get_minrecs = xfs_inobt_get_minrecs, 282 .get_minrecs = xfs_inobt_get_minrecs,