Return-Path: Received: from mail-wr0-f193.google.com ([209.85.128.193]:55588 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751819AbdKKKmr (ORCPT ); Sat, 11 Nov 2017 05:42:47 -0500 Received: by mail-wr0-f193.google.com with SMTP id l8so10540736wre.12 for ; Sat, 11 Nov 2017 02:42:47 -0800 (PST) From: Ilya Dryomov To: stable@vger.kernel.org Cc: Greg KH Subject: [PATCH for < 4.9] rbd: use GFP_NOIO for parent stat and data requests Date: Sat, 11 Nov 2017 11:41:41 +0100 Message-Id: <1510396901-29487-2-git-send-email-idryomov@gmail.com> In-Reply-To: <1510396901-29487-1-git-send-email-idryomov@gmail.com> References: <1510396901-29487-1-git-send-email-idryomov@gmail.com> Sender: stable-owner@vger.kernel.org List-ID: rbd_img_obj_exists_submit() and rbd_img_obj_parent_read_full() are on the writeback path for cloned images -- we attempt a stat on the parent object to see if it exists and potentially read it in to call copyup. GFP_NOIO should be used instead of GFP_KERNEL here. Cc: stable@vger.kernel.org Link: http://tracker.ceph.com/issues/22014 Signed-off-by: Ilya Dryomov Reviewed-by: David Disseldorp [idryomov@gmail.com: backport to < 4.9: context] --- drivers/block/rbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index fbdddd6f94b8..ca3bcc81b623 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -2736,7 +2736,7 @@ static int rbd_img_obj_parent_read_full(struct rbd_obj_request *obj_request) * from the parent. */ page_count = (u32)calc_pages_for(0, length); - pages = ceph_alloc_page_vector(page_count, GFP_KERNEL); + pages = ceph_alloc_page_vector(page_count, GFP_NOIO); if (IS_ERR(pages)) { result = PTR_ERR(pages); pages = NULL; @@ -2863,7 +2863,7 @@ static int rbd_img_obj_exists_submit(struct rbd_obj_request *obj_request) */ size = sizeof (__le64) + sizeof (__le32) + sizeof (__le32); page_count = (u32)calc_pages_for(0, size); - pages = ceph_alloc_page_vector(page_count, GFP_KERNEL); + pages = ceph_alloc_page_vector(page_count, GFP_NOIO); if (IS_ERR(pages)) return PTR_ERR(pages); -- 2.4.3