projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
462e650
)
libceph: introduce ceph_x_encrypt_offset()
author
Ilya Dryomov
<idryomov@gmail.com>
Fri, 2 Dec 2016 15:35:07 +0000
(16:35 +0100)
committer
Ilya Dryomov
<idryomov@gmail.com>
Mon, 12 Dec 2016 22:09:19 +0000
(23:09 +0100)
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
net/ceph/auth_x.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ceph/auth_x.c
b/net/ceph/auth_x.c
index 28bde937d58aee303f936226cbbb04bbe1323e99..de30c585c2a2ec4b280525781af14df69b4f5ff7 100644
(file)
--- a/
net/ceph/auth_x.c
+++ b/
net/ceph/auth_x.c
@@
-39,10
+39,14
@@
static int ceph_x_should_authenticate(struct ceph_auth_client *ac)
return need != 0;
}
+static int ceph_x_encrypt_offset(void)
+{
+ return sizeof(u32) + sizeof(struct ceph_x_encrypt_header);
+}
+
static int ceph_x_encrypt_buflen(int ilen)
{
- return sizeof(struct ceph_x_encrypt_header) + ilen + 16 +
- sizeof(u32);
+ return ceph_x_encrypt_offset() + ilen + 16;
}
static int ceph_x_encrypt(struct ceph_crypto_key *secret,