Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3977140ybt; Sun, 5 Jul 2020 12:35:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgS9sweDU36S3jg5GqXzGvRcW0+zNotGBUWk7Ps6aFiTxppx4XoI7xtTJK89PzCYUKfAQT X-Received: by 2002:a50:ec8f:: with SMTP id e15mr50715048edr.70.1593977754314; Sun, 05 Jul 2020 12:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593977754; cv=none; d=google.com; s=arc-20160816; b=wAhyT7vHvGmha4euJ21B283BcCAPKZzqty/GRmiNgBaK0034BjIFdc5yDz/jkYPuxT B/hwejp0JdBaYZOh82Rrwi2UiyQI0lPz61xexJ54EWWmCBuZrlkQtKdZKoFVlUgNuJo+ O24GraOJsxw32QUiJWZl3RFYSn3PinEm5N1/GEEv+JezFMcIj70HfZEDNV6oO8wbhVK5 kgU0ODS26zHofn4cvreFc0lOGeHdrJgs0hANPHyhTZvKY8qjy2xRAfJYq5Rlg31ua+jz an4S/vEsiTaYWRtOLPTaEtF7P6q9ZM7HIIL66MCfCId8GCLJSUJLeQeEJyOH0TxffM+p p5Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=+bk2lmZ7gPPPzttyHRqxEmsrZ661RY3hev7QPoHymss=; b=N467tYbPYNnD/sInxcR74BoAdKBaMMF7fHouAis4U0aMCMwV5lot18hW60cbmK3Q1a vz+40sbB9UsgGXiRul4MS4J2a/3qdL4zWF5ni5beFG8mjMOwXjYm/MaVfsVMmCDvIQy+ 06SjcO2AreiIo0/nod0+/Q9MadBwZAoTP4d7iH2zfNLroZgByGR0rTXuVp9EaHT5KYOa 68FYgYO5TfjENMNB/6O3c978YzPOOfLWcrsMxtdahz80COk4sxzkLBwb5lgzpez7rViv RRh7G9cQ2q5aOvK8UREIkdVDTrLReO246KHYtnaA0jPray9170KUlBRcLAkU/0ZOkvFo 5+9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=n12YwTLb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v22si11037087ejf.411.2020.07.05.12.35.07; Sun, 05 Jul 2020 12:35:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=n12YwTLb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728145AbgGETdm (ORCPT + 99 others); Sun, 5 Jul 2020 15:33:42 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:38231 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727902AbgGETdk (ORCPT ); Sun, 5 Jul 2020 15:33:40 -0400 Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20200705193338epoutp0405b408082c1b00bdc62a5f466e4f09e6~e8jLwG2Ax0782307823epoutp04D for ; Sun, 5 Jul 2020 19:33:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20200705193338epoutp0405b408082c1b00bdc62a5f466e4f09e6~e8jLwG2Ax0782307823epoutp04D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1593977618; bh=+bk2lmZ7gPPPzttyHRqxEmsrZ661RY3hev7QPoHymss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n12YwTLbuOZ8sDvazG6o5Ig5khq2QBGP7KHi9INq9NJz/KiwsZ4L5GhUBbRKyO26+ jBpDcnslHuEpA07TodfsDXeQSqC71fgGPOgZo21UAHguuNLihkAeoTwjX1C02azQrV 03sTDAQpWkm5sioyS0qttCKA1afObWHSbGJtWLL0= Received: from epsmges5p3new.samsung.com (unknown [182.195.42.75]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20200705193337epcas5p38b3241a80f295a850f02f80116223afd~e8jLC2ESo1042010420epcas5p3V; Sun, 5 Jul 2020 19:33:37 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id CB.56.09475.11B220F5; Mon, 6 Jul 2020 04:33:37 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20200705193337epcas5p4b15eec1bbd6dd687f706f9b8fd93c14a~e8jKnGSe71079210792epcas5p4V; Sun, 5 Jul 2020 19:33:37 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200705193337epsmtrp2f9305ac5378e00d951f1adcb31de8bb8~e8jKmYTgC0744407444epsmtrp2H; Sun, 5 Jul 2020 19:33:37 +0000 (GMT) X-AuditID: b6c32a4b-39fff70000002503-3d-5f022b11a440 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id D1.B4.08382.11B220F5; Mon, 6 Jul 2020 04:33:37 +0900 (KST) Received: from localhost.localdomain (unknown [107.110.206.5]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200705193335epsmtip104c777968086b6fa02de6131c3251a7d~e8jJJoqDZ3114531145epsmtip1R; Sun, 5 Jul 2020 19:33:35 +0000 (GMT) From: Kanchan Joshi To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Damien.LeMoal@wdc.com, Kanchan Joshi , Selvakumar S , Nitesh Shetty , Javier Gonzalez Subject: [PATCH v2] block: fix error code for zone-append Date: Mon, 6 Jul 2020 00:59:53 +0530 Message-Id: <1593977393-21446-2-git-send-email-joshi.k@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1593977393-21446-1-git-send-email-joshi.k@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrAIsWRmVeSWpSXmKPExsWy7bCmhq6gNlO8wap5Jha/p09htVh9t5/N orX9G5PF4zuf2S2O/n/LZrH3lrbF5V1z2Cy2/Z7PbHFlyiJmi9c/TrI5cHlcPlvq0bdlFaPH 501yHu0HupkCWKK4bFJSczLLUov07RK4Mu61TWIpeMlW8fnHRMYGxmusXYycHBICJhKvTy0A srk4hAR2M0p07XzEAuF8YpS4/PU0VOYbo8S3m9uYYFoWXGxjhkjsZZS4svQ8I0hCSOAzo8TE x+xdjBwcbAKaEhcml4KERQSEJfZ3tIJNZRb4xSixd8EusN3CApYSO88/ZAOxWQRUJbqv32MF 6eUVcJaY9kIRYpecxM1zncwgNqeAi8TmSSsZQeZICFxjlzh+ejnUQS4SP959Z4awhSVeHd/C DmFLSXx+t5cNwi6W+HXnKDNEcwejxPWGmSwQCXuJi3v+MoEsZgY6ev0ufZAwswCfRO/vJ2Bh CQFeiY42IYhqRYl7k55Cg05c4uGMJVC2h8TWXTfZIWEynVHiwoc2pgmMsrMQpi5gZFzFKJla UJybnlpsWmCcl1quV5yYW1yal66XnJ+7iRGcCLS8dzA+evBB7xAjEwfjIUYJDmYlEd5ebcZ4 Id6UxMqq1KL8+KLSnNTiQ4zSHCxK4rxKP87ECQmkJ5akZqemFqQWwWSZODilGpjOvHA4dPP+ inS55U6H5V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/67ObD2bzrb04w/Lm ktnTHHrm3Pix+sf9CbMnOHJWLDcTnxvyjbdxfs4yzsQvZ1dq3XhUP/eMGfv+9KfsTIZWK1xf tdz+Ic2io/9nXnHJE/byl9KLv0uGNPwVW33mf417/sNrf95ce3h+35z565y3LvaQWHIuWU9i RvnN3pf1DddFQnIM1uZaV0/4XB0bssFZV4mlOCPRUIu5qDgRAF+U1DSxAgAA X-CMS-MailID: 20200705193337epcas5p4b15eec1bbd6dd687f706f9b8fd93c14a X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P X-CMS-RootMailID: 20200705193337epcas5p4b15eec1bbd6dd687f706f9b8fd93c14a References: <1593977393-21446-1-git-send-email-joshi.k@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid returning success when max_append_sectors is zero. This prevents infinite loop in bio_iov_iter_get_pages(). Signed-off-by: Kanchan Joshi Signed-off-by: Selvakumar S Signed-off-by: Nitesh Shetty Signed-off-by: Javier Gonzalez Reviewed-by: Damien Le Moal --- block/bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bio.c b/block/bio.c index a7366c0..0cecdbc 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1044,7 +1044,7 @@ static int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter) size_t offset; if (WARN_ON_ONCE(!max_append_sectors)) - return 0; + return -EINVAL; /* * Move page array up in the allocated memory for the bio vecs as far as -- 2.7.4