]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: don't ceph_abort on bad llseek whence value 31380/head
authorJeff Layton <jlayton@redhat.com>
Mon, 16 Sep 2019 15:00:34 +0000 (11:00 -0400)
committerNathan Cutler <ncutler@suse.com>
Mon, 4 Nov 2019 18:19:14 +0000 (19:19 +0100)
There is no need to abort in this case. Just return -EINVAL.

Fixes: https://tracker.ceph.com/issues/41871
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit bd20464d747a7357639dfd5c5ec1f34b2f88d378)

src/client/Client.cc

index 7248547123e7bde10712ec3ad630abc62ae58ab6..e46b3f507702ee895abdc0a1cf00fef4e63dd161 100644 (file)
@@ -8731,7 +8731,8 @@ loff_t Client::_lseek(Fh *f, loff_t offset, int whence)
     break;
 
   default:
-    ceph_abort();
+    ldout(cct, 1) << __func__ << ": invalid whence value " << whence << dendl;
+    return -EINVAL;
   }
 
   if (pos < 0) {