diff options
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
-rw-r--r-- | fs/xfs/xfs_ialloc.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index bbf537f64c41..138651afd44f 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
@@ -172,6 +172,26 @@ xfs_inobt_lookup_le( | |||
172 | } | 172 | } |
173 | 173 | ||
174 | /* | 174 | /* |
175 | * Update the record referred to by cur to the value given | ||
176 | * by [ino, fcnt, free]. | ||
177 | * This either works (return 0) or gets an EFSCORRUPTED error. | ||
178 | */ | ||
179 | STATIC int /* error */ | ||
180 | xfs_inobt_update( | ||
181 | struct xfs_btree_cur *cur, /* btree cursor */ | ||
182 | xfs_agino_t ino, /* starting inode of chunk */ | ||
183 | __int32_t fcnt, /* free inode count */ | ||
184 | xfs_inofree_t free) /* free inode mask */ | ||
185 | { | ||
186 | union xfs_btree_rec rec; | ||
187 | |||
188 | rec.inobt.ir_startino = cpu_to_be32(ino); | ||
189 | rec.inobt.ir_freecount = cpu_to_be32(fcnt); | ||
190 | rec.inobt.ir_free = cpu_to_be64(free); | ||
191 | return xfs_btree_update(cur, &rec); | ||
192 | } | ||
193 | |||
194 | /* | ||
175 | * Allocate new inodes in the allocation group specified by agbp. | 195 | * Allocate new inodes in the allocation group specified by agbp. |
176 | * Return 0 for success, else error code. | 196 | * Return 0 for success, else error code. |
177 | */ | 197 | */ |