]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: Factor xfs_seek_hole_data into helper
authorEric Sandeen <sandeen@redhat.com>
Mon, 8 Feb 2016 00:25:16 +0000 (11:25 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 8 Feb 2016 00:25:16 +0000 (11:25 +1100)
commite1e6e95b45cebc65d61494406b03325019658604
treed26e14d7b6d3ebd94c3c9347e6ac0dc608bb2f80
parenta7976e3b8b05aaa7164120dc887b0ebe23bf9812
xfs: Factor xfs_seek_hole_data into helper

Factor xfs_seek_hole_data into an unlocked helper which takes
an xfs inode rather than a file for internal use.

Also allow specification of "end" - the vfs lseek interface is
defined such that any offset past eof/i_size shall return -ENXIO,
but we will use this for quota code which does not maintain i_size,
and we want to be able to SEEK_DATA past i_size as well.  So the
lseek path can send in i_size, and the quota code can determine
its own ending offset.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_file.c
fs/xfs/xfs_inode.h