ceph: fix unaligned access in ceph_send_cap_releases
Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
b726ec972c
commit
4198aba4f4
|
@ -1855,7 +1855,8 @@ again:
|
||||||
num_cap_releases--;
|
num_cap_releases--;
|
||||||
|
|
||||||
head = msg->front.iov_base;
|
head = msg->front.iov_base;
|
||||||
le32_add_cpu(&head->num, 1);
|
put_unaligned_le32(get_unaligned_le32(&head->num) + 1,
|
||||||
|
&head->num);
|
||||||
item = msg->front.iov_base + msg->front.iov_len;
|
item = msg->front.iov_base + msg->front.iov_len;
|
||||||
item->ino = cpu_to_le64(cap->cap_ino);
|
item->ino = cpu_to_le64(cap->cap_ino);
|
||||||
item->cap_id = cpu_to_le64(cap->cap_id);
|
item->cap_id = cpu_to_le64(cap->cap_id);
|
||||||
|
|
Loading…
Reference in New Issue