aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/direct.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/direct.c')
-rw-r--r--fs/nilfs2/direct.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/nilfs2/direct.c b/fs/nilfs2/direct.c
index eaeccb068b5e..8e8095c2e1bb 100644
--- a/fs/nilfs2/direct.c
+++ b/fs/nilfs2/direct.c
@@ -242,8 +242,7 @@ static int nilfs_direct_gather_data(struct nilfs_bmap *bmap,
242} 242}
243 243
244int nilfs_direct_delete_and_convert(struct nilfs_bmap *bmap, 244int nilfs_direct_delete_and_convert(struct nilfs_bmap *bmap,
245 __u64 key, __u64 *keys, __u64 *ptrs, 245 __u64 key, __u64 *keys, __u64 *ptrs, int n)
246 int n, __u64 low, __u64 high)
247{ 246{
248 struct nilfs_direct *direct; 247 struct nilfs_direct *direct;
249 __le64 *dptrs; 248 __le64 *dptrs;
@@ -273,8 +272,7 @@ int nilfs_direct_delete_and_convert(struct nilfs_bmap *bmap,
273 dptrs[i] = NILFS_BMAP_INVALID_PTR; 272 dptrs[i] = NILFS_BMAP_INVALID_PTR;
274 } 273 }
275 274
276 nilfs_direct_init(bmap, low, high); 275 nilfs_direct_init(bmap);
277
278 return 0; 276 return 0;
279} 277}
280 278
@@ -410,14 +408,11 @@ static const struct nilfs_direct_operations nilfs_direct_ops_p = {
410 .dop_assign = nilfs_direct_assign_p, 408 .dop_assign = nilfs_direct_assign_p,
411}; 409};
412 410
413int nilfs_direct_init(struct nilfs_bmap *bmap, __u64 low, __u64 high) 411int nilfs_direct_init(struct nilfs_bmap *bmap)
414{ 412{
415 struct nilfs_direct *direct; 413 struct nilfs_direct *direct = (struct nilfs_direct *)bmap;
416 414
417 direct = (struct nilfs_direct *)bmap;
418 bmap->b_ops = &nilfs_direct_ops; 415 bmap->b_ops = &nilfs_direct_ops;
419 bmap->b_low = low;
420 bmap->b_high = high;
421 switch (bmap->b_inode->i_ino) { 416 switch (bmap->b_inode->i_ino) {
422 case NILFS_DAT_INO: 417 case NILFS_DAT_INO:
423 direct->d_ops = &nilfs_direct_ops_p; 418 direct->d_ops = &nilfs_direct_ops_p;