diff options
author | Christoph Hellwig <hch@lst.de> | 2019-11-09 02:05:31 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-11 03:54:22 +0300 |
commit | ee641d5af5e638d53d9bcde459836b1cb90f12e2 (patch) | |
tree | b9e410f2b43bd8ff267af2f73e7a8be23de5d0e2 /fs/xfs/libxfs/xfs_dir2_block.c | |
parent | da3ca0df8bd146bf1c83db1b9763189976175e87 (diff) | |
download | linux-ee641d5af5e638d53d9bcde459836b1cb90f12e2.tar.xz |
xfs: remove the ->data_unused_p method
Replace the two users of the ->data_unused_p dir ops method with a
direct calculation using ->data_entry_offset, and clean them up a bit.
xfs_dir2_sf_to_block already had an offset variable containing the
value of ->data_entry_offset, which we are now reusing to make it
clear that the initial freespace entry is at the same place that
we later fill in the 1 entry, and in xfs_dir3_data_init the function
is cleaned up a bit to keep the initialization of fields of a given
structure close to each other, and to avoid a local variable.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2_block.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_dir2_block.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2_block.c b/fs/xfs/libxfs/xfs_dir2_block.c index e7719356829d..9061f378d52a 100644 --- a/fs/xfs/libxfs/xfs_dir2_block.c +++ b/fs/xfs/libxfs/xfs_dir2_block.c @@ -1112,7 +1112,7 @@ xfs_dir2_sf_to_block( * The whole thing is initialized to free by the init routine. * Say we're using the leaf and tail area. */ - dup = dp->d_ops->data_unused_p(hdr); + dup = bp->b_addr + offset; needlog = needscan = 0; error = xfs_dir2_data_use_free(args, bp, dup, args->geo->blksize - i, i, &needlog, &needscan); |