]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
vfs: Return -ENXIO for negative SEEK_HOLE / SEEK_DATA offsets
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 25 Sep 2017 10:23:03 +0000 (12:23 +0200)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 12 Oct 2017 21:20:31 +0000 (16:20 -0500)
commita95cad1a7267f3ec8fd7ebe538487d028c6a33a7
tree13582116479659e7629f8c7caa8c496c3fa9b261
parentadf147fe8b15832f5eb51d21f6b07e96b5a271ce
vfs: Return -ENXIO for negative SEEK_HOLE / SEEK_DATA offsets

BugLink: http://bugs.launchpad.net/bugs/1721777
commit fc46820b27a2d9a46f7e90c9ceb4a64a1bc5fab8 upstream.

In generic_file_llseek_size, return -ENXIO for negative offsets as well
as offsets beyond EOF.  This affects filesystems which don't implement
SEEK_HOLE / SEEK_DATA internally, possibly because they don't support
holes.

Fixes xfstest generic/448.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/read_write.c