aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2017-11-06 05:33:36 -0500
committerIlya Dryomov <idryomov@gmail.com>2017-11-09 03:32:53 -0500
commit1e37f2f84680fa7f8394fd444b6928e334495ccc (patch)
treeb69c9047d3d73f4e39716fbbf90d659e512d788a /drivers
parent39dae59d66acd86d1de24294bd2f343fd5e7a625 (diff)
rbd: use GFP_NOIO for parent stat and data requests
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 <idryomov@gmail.com> Reviewed-by: David Disseldorp <ddiss@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/rbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index b640ad8a6d20..adc877dfef5c 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -2692,7 +2692,7 @@ static int rbd_img_obj_parent_read_full(struct rbd_obj_request *obj_request)
2692 * from the parent. 2692 * from the parent.
2693 */ 2693 */
2694 page_count = (u32)calc_pages_for(0, length); 2694 page_count = (u32)calc_pages_for(0, length);
2695 pages = ceph_alloc_page_vector(page_count, GFP_KERNEL); 2695 pages = ceph_alloc_page_vector(page_count, GFP_NOIO);
2696 if (IS_ERR(pages)) { 2696 if (IS_ERR(pages)) {
2697 result = PTR_ERR(pages); 2697 result = PTR_ERR(pages);
2698 pages = NULL; 2698 pages = NULL;
@@ -2827,7 +2827,7 @@ static int rbd_img_obj_exists_submit(struct rbd_obj_request *obj_request)
2827 */ 2827 */
2828 size = sizeof (__le64) + sizeof (__le32) + sizeof (__le32); 2828 size = sizeof (__le64) + sizeof (__le32) + sizeof (__le32);
2829 page_count = (u32)calc_pages_for(0, size); 2829 page_count = (u32)calc_pages_for(0, size);
2830 pages = ceph_alloc_page_vector(page_count, GFP_KERNEL); 2830 pages = ceph_alloc_page_vector(page_count, GFP_NOIO);
2831 if (IS_ERR(pages)) { 2831 if (IS_ERR(pages)) {
2832 ret = PTR_ERR(pages); 2832 ret = PTR_ERR(pages);
2833 goto fail_stat_request; 2833 goto fail_stat_request;