OSD client allocates a message with a page vector for OSD_MAP, OSD_BACKOFF and WATCH_NOTIFY message types (see alloc_msg_with_page_vector() caller), but pages vector release is never called. Signed-off-by: Roman Penyaev <rpenyaev@xxxxxxx> Cc: Ilya Dryomov <idryomov@xxxxxxxxx> Cc: Jeff Layton <jlayton@xxxxxxxxxx> Cc: Sage Weil <sage@xxxxxxxxxx> Cc: ceph-devel@xxxxxxxxxxxxxxx --- net/ceph/messenger.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 5b4bd8261002..28cbd55ec2e3 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -3248,8 +3248,15 @@ static struct ceph_msg_data *ceph_msg_data_add(struct ceph_msg *msg) static void ceph_msg_data_destroy(struct ceph_msg_data *data) { - if (data->type == CEPH_MSG_DATA_PAGELIST) + if (data->type == CEPH_MSG_DATA_PAGES) { + int num_pages; + + num_pages = calc_pages_for(data->alignment, + data->length); + ceph_release_page_vector(data->pages, num_pages); + } else if (data->type == CEPH_MSG_DATA_PAGELIST) { ceph_pagelist_release(data->pagelist); + } } void ceph_msg_data_add_pages(struct ceph_msg *msg, struct page **pages, -- 2.24.1