vfs: export lseek_execute() to modules
authorJie Liu <[email protected]>
Tue, 25 Jun 2013 04:02:13 +0000 (12:02 +0800)
committerAl Viro <[email protected]>
Wed, 3 Jul 2013 12:23:27 +0000 (16:23 +0400)
commit46a1c2c7ae53de2a5676754b54a73c591a3951d2
tree1910875cf34a7fe1cd8fd9474d3a5538236fb4f0
parent2142914e3eb1168978e842f65cfd182be7582861
vfs: export lseek_execute() to modules

For those file systems(btrfs/ext4/ocfs2/tmpfs) that support
SEEK_DATA/SEEK_HOLE functions, we end up handling the similar
matter in lseek_execute() to update the current file offset
to the desired offset if it is valid, ceph also does the
simliar things at ceph_llseek().

To reduce the duplications, this patch make lseek_execute()
public accessible so that we can call it directly from the
underlying file systems.

Thanks Dave Chinner for this suggestion.

[AV: call it vfs_setpos(), don't bring the removed 'inode' argument back]

v2->v1:
- Add kernel-doc comments for lseek_execute()
- Call lseek_execute() in ceph->llseek()

Signed-off-by: Jie Liu <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Josef Bacik <[email protected]>
Cc: Ben Myers <[email protected]>
Cc: Ted Tso <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Sage Weil <[email protected]>
Signed-off-by: Al Viro <[email protected]>
fs/btrfs/file.c
fs/ceph/file.c
fs/ext4/file.c
fs/ocfs2/file.c
fs/read_write.c
fs/xfs/xfs_file.c
include/linux/fs.h
mm/shmem.c