summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2019-06-04 22:17:32 +0300
committerIlya Dryomov <idryomov@gmail.com>2019-07-08 15:01:43 +0300
commit2f9800c899dc1f4ad0ca32105069bfa83e80a05b (patch)
tree316679339f9fbd9d2e5fc58f64c9af7ef3eb8574
parentf3848af1bf545575d7a98084f82f67e96ffdf4d5 (diff)
downloadlinux-2f9800c899dc1f4ad0ca32105069bfa83e80a05b.tar.xz
ceph: fix decode_locker to use ceph_decode_entity_addr
Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r--net/ceph/cls_lock_client.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ceph/cls_lock_client.c b/net/ceph/cls_lock_client.c
index 4cc28541281b..b1d12bf4b83e 100644
--- a/net/ceph/cls_lock_client.c
+++ b/net/ceph/cls_lock_client.c
@@ -264,8 +264,11 @@ static int decode_locker(void **p, void *end, struct ceph_locker *locker)
return ret;
*p += sizeof(struct ceph_timespec); /* skip expiration */
- ceph_decode_copy(p, &locker->info.addr, sizeof(locker->info.addr));
- ceph_decode_addr(&locker->info.addr);
+
+ ret = ceph_decode_entity_addr(p, end, &locker->info.addr);
+ if (ret)
+ return ret;
+
len = ceph_decode_32(p);
*p += len; /* skip description */