]> git.baikalelectronics.ru Git - 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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Sep 2017 20:46:06 +0000 (13:46 -0700)
commitc9710c3d280e0b810cf89dc476b89a0044c6bc83
treef3475fb1ff7230052fc721baf0e1c78019d3e956
parent35d2be231e960796c6c5707489a8cefcf7edd209
vfs: Return -ENXIO for negative SEEK_HOLE / SEEK_DATA offsets

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>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/read_write.c