diff options
author | Jeff Layton <jlayton@kernel.org> | 2019-06-04 15:17:32 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-07-08 14:01:43 +0200 |
commit | 2f9800c899dc1f4ad0ca32105069bfa83e80a05b (patch) | |
tree | 316679339f9fbd9d2e5fc58f64c9af7ef3eb8574 /net/ceph/cls_lock_client.c | |
parent | f3848af1bf545575d7a98084f82f67e96ffdf4d5 (diff) |
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>
Diffstat (limited to 'net/ceph/cls_lock_client.c')
-rw-r--r-- | net/ceph/cls_lock_client.c | 7 |
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 */ |