From patchwork Mon Nov 14 22:56:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 9428649 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 24CB060484 for ; Mon, 14 Nov 2016 22:56:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DB2F2882A for ; Mon, 14 Nov 2016 22:56:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 216182892A; Mon, 14 Nov 2016 22:56:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C5F92882A for ; Mon, 14 Nov 2016 22:56:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S940580AbcKNW40 (ORCPT ); Mon, 14 Nov 2016 17:56:26 -0500 Received: from mail-pf0-f179.google.com ([209.85.192.179]:33490 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938977AbcKNW40 (ORCPT ); Mon, 14 Nov 2016 17:56:26 -0500 Received: by mail-pf0-f179.google.com with SMTP id d2so31869042pfd.0 for ; Mon, 14 Nov 2016 14:56:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=VnNCXBDiswbYXj2kBo5jNjhSVNZkQGW74qE0WsR6Tnc=; b=NteLhH6pbJcWyF8nA3DUaGBpPuNwJmSWIn4Urkl9NK14IdY7Sdpi8+VY0nl+DOvWHA tDKRxCLyNYf1930ewBu6dOZpGXFH9+RnjmdDKWjfVtLE1RasoS6FtUcCbyx6fav4VKUE zDGFM84KPnJ4tbGQncVPqTmdfK6W8r0kt/rZ2teBXcIqjFCxmY6ZntCQwf3CZdFpxRMT rKl430ifV+cF56aFrbd3/gh1o64OebNU5ouVNqDCJKsfLa/SfRzNF/ogIwJ04eYS/1T1 7wpbXa0VUa5vpV71hmWIMWdyK9NrjO0pfaIG6oVtWQhWVkTPUGwp99M1R5oyk+757/Dg gVDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VnNCXBDiswbYXj2kBo5jNjhSVNZkQGW74qE0WsR6Tnc=; b=VKxuhelzSqaHaQJt3gSq18YT2/gunBEwPx/x7uR/MChFqz8vd1o9/ZODf1955+iFXU 6F0iwXV4p1R5E4/rWM42by+hTqEeaNRKed0W0DuT4CgvKVynxrmXs3hf9NIFn2/bfMbU kHt+0oxX98pQZZsyx4wML+aupcBcuo87VvWu5enNBff3wGABeZz48FV9ihs3HVM0VTb6 f10WzymAj2c2XfzFipKJbruP2whFhZdz/kJY4zGh8N+abL8ukenTSE+Y3HoCvym1RddY 7/29oV+X9Ptjl8sCYjTvVMT7Ea8ZOIeASTJwvia4svKJ/ehApTO3F5A7ENnDxusSHkJj cywQ== X-Gm-Message-State: ABUngvfYFZCYLcD1rJxzX9jlHwkUhkcmdLj1LklEDraD10YHxIKcvq5UZI94yK3H9C8dqdID X-Received: by 10.99.208.21 with SMTP id z21mr72963850pgf.79.1479164185541; Mon, 14 Nov 2016 14:56:25 -0800 (PST) Received: from vader.thefacebook.com ([2620:10d:c090:200::a:38b9]) by smtp.gmail.com with ESMTPSA id v76sm16135019pfk.77.2016.11.14.14.56.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Nov 2016 14:56:25 -0800 (PST) From: Omar Sandoval To: linux-block@vger.kernel.org Cc: kernel-team@fb.com, Ming Lei Subject: [PATCH] loop: return proper error from loop_queue_rq() Date: Mon, 14 Nov 2016 14:56:17 -0800 Message-Id: X-Mailer: git-send-email 2.10.2 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Omar Sandoval ->queue_rq() should return one of the BLK_MQ_RQ_QUEUE_* constants, not an errno. f4aa4c7bbac6 ("block: loop: convert to per-device workqueue") Signed-off-by: Omar Sandoval --- drivers/block/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index fa1b7a9..4af8187 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1646,7 +1646,7 @@ static int loop_queue_rq(struct blk_mq_hw_ctx *hctx, blk_mq_start_request(bd->rq); if (lo->lo_state != Lo_bound) - return -EIO; + return BLK_MQ_RQ_QUEUE_ERROR; switch (req_op(cmd->rq)) { case REQ_OP_FLUSH: