ceph: don't try fill file_lock on unsuccessful GETFILELOCK reply
authorJeff Layton <jlayton@kernel.org>
Thu, 15 Aug 2019 10:23:38 +0000 (06:23 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 22 Aug 2019 08:47:41 +0000 (10:47 +0200)
commit28a282616f56990547b9dcd5c6fbd2001344664c
treea2e75a574bf4690086e37be5cb5871902937ba07
parentc95f1c5f436badb9bb87e9b30fd573f6b3d59423
ceph: don't try fill file_lock on unsuccessful GETFILELOCK reply

When ceph_mdsc_do_request returns an error, we can't assume that the
filelock_reply pointer will be set. Only try to fetch fields out of
the r_reply_info when it returns success.

Cc: stable@vger.kernel.org
Reported-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/locks.c