ceph: Correctly return NXIO errors from ceph_llseek
authorPhil Turnbull <phil.turnbull@oracle.com>
Thu, 21 Jul 2016 17:43:09 +0000 (13:43 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 20 Nov 2016 01:01:28 +0000 (01:01 +0000)
commit7334e0adefc28bfa2356414b1d79fc56d6b8e7ed
tree3cb7431a9c4990b94f3d6bde5db54a55bde55823
parent538cff0a1a08d5bc658351c2cc35456205b5ff92
ceph: Correctly return NXIO errors from ceph_llseek

commit 955818cd5b6c4b58ea574ace4573e7afa4c19c1e upstream.

ceph_llseek does not correctly return NXIO errors because the 'out' path
always returns 'offset'.

Fixes: 06222e491e66 ("fs: handle SEEK_HOLE/SEEK_DATA properly in all fs's that define their own llseek")
Signed-off-by: Phil Turnbull <phil.turnbull@oracle.com>
Signed-off-by: Yan, Zheng <zyan@redhat.com>
[bwh: Backported to 3.2:
 - We don't use vfs_setpos(); instead set ret = -EINVAL or ret = offset
   directly
 - Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/ceph/file.c