libxfs: clean up _dir2_data_freescan
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 8 Nov 2016 00:56:51 +0000 (11:56 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 8 Nov 2016 00:56:51 +0000 (11:56 +1100)
commit523b2e76e3ecb54e0ec8651e32291bdaefc5f866
tree527a75eef998858ccc0595a7369c13ecfb962bf3
parentae90b994b40f7c724701877c27b9148ee262ba62
libxfs: clean up _dir2_data_freescan

Refactor the implementations of xfs_dir2_data_freescan into a
routine that takes the raw directory block parameters and
a second function that figures out the raw parameters from the
directory inode.  This enables us to use the exact same code
for both userspace and the kernel, since repair knows exactly
which directory block geometry parameters it needs.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_dir2.h
fs/xfs/libxfs/xfs_dir2_data.c