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.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c
index 6c0a07d1fed3..9f4e33c945c2 100644
--- a/fs/xfs/xfs_ialloc_btree.c
+++ b/fs/xfs/xfs_ialloc_btree.c
@@ -41,50 +41,6 @@
41#include "xfs_error.h" 41#include "xfs_error.h"
42 42
43 43
44/*
45 * Get the data from the pointed-to record.
46 */
47int /* error */
48xfs_inobt_get_rec(
49 xfs_btree_cur_t *cur, /* btree cursor */
50 xfs_agino_t *ino, /* output: starting inode of chunk */
51 __int32_t *fcnt, /* output: number of free inodes */
52 xfs_inofree_t *free, /* output: free inode mask */
53 int *stat) /* output: success/failure */
54{
55 xfs_inobt_block_t *block; /* btree block */
56 xfs_buf_t *bp; /* buffer containing btree block */
57#ifdef DEBUG
58 int error; /* error return value */
59#endif
60 int ptr; /* record number */
61 xfs_inobt_rec_t *rec; /* record data */
62
63 bp = cur->bc_bufs[0];
64 ptr = cur->bc_ptrs[0];
65 block = XFS_BUF_TO_INOBT_BLOCK(bp);
66#ifdef DEBUG
67 if ((error = xfs_btree_check_sblock(cur, block, 0, bp)))
68 return error;
69#endif
70 /*
71 * Off the right end or left end, return failure.
72 */
73 if (ptr > be16_to_cpu(block->bb_numrecs) || ptr <= 0) {
74 *stat = 0;
75 return 0;
76 }
77 /*
78 * Point to the record and extract its data.
79 */
80 rec = XFS_INOBT_REC_ADDR(block, ptr, cur);
81 *ino = be32_to_cpu(rec->ir_startino);
82 *fcnt = be32_to_cpu(rec->ir_freecount);
83 *free = be64_to_cpu(rec->ir_free);
84 *stat = 1;
85 return 0;
86}
87
88STATIC int 44STATIC int
89xfs_inobt_get_minrecs( 45xfs_inobt_get_minrecs(
90 struct xfs_btree_cur *cur, 46 struct xfs_btree_cur *cur,