From patchwork Mon Jun 4 17:59:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Manzanares X-Patchwork-Id: 10447093 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 4A56B601A1 for ; Mon, 4 Jun 2018 18:00:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D03728FC3 for ; Mon, 4 Jun 2018 18:00:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A4B828FBB; Mon, 4 Jun 2018 18:00:08 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, 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 0137028F52 for ; Mon, 4 Jun 2018 18:00:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751737AbeFDSAD (ORCPT ); Mon, 4 Jun 2018 14:00:03 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:37520 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751467AbeFDSAC (ORCPT ); Mon, 4 Jun 2018 14:00:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1528135202; x=1559671202; h=from:to:cc:subject:date:message-id; bh=OoYAAimdbS9PwCNjKmRUrlbpUnKlkEzO0TTGvrqlfC4=; b=lWGnTLBqbjZVTkF3yb7p8L9JMJoNXdftU/1k8JHSJTQEHqLCHtWrg/k+ EE4O9EAT/MP4EDmBD0JktPFJXA54keO/HqFR+tbxIb+Sfqu3XknfNTmkS 3M+m4uI3GkutbzUNkuclInQ4lFQ1j5GTp7rCFlVs390D4Az/7WtnmRIcY 6rvyw4cdSWEmKLBxhaz0NVsfFqgLe+wkRG+S/lPebWh5rIygEUbQlNtz4 aCt+Bk1PvV4y25nDQ0FbxuALw9MZDAfXcW3ER4nY+Y0J6fiDV6G7eFWbn aVCv8l4Qnh0ekIGNxVneoyXNIJqYovPMvDZeDamAvU3MsONc1FLnRf0rY Q==; X-IronPort-AV: E=Sophos;i="5.49,476,1520870400"; d="scan'208";a="81550572" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 05 Jun 2018 02:00:01 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 04 Jun 2018 10:50:04 -0700 Received: from penguito-adamm.sdcorp.global.sandisk.com ([10.11.47.13]) by uls-op-cesaip02.wdc.com with ESMTP; 04 Jun 2018 11:00:01 -0700 From: adam.manzanares@wdc.com To: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org Cc: axboe@kernel.dk, bcrl@kvack.org, mingo@kernel.org, tglx@linutronix.de, kstewart@linuxfoundation.org, peterz@infradead.org, pombredanne@nexb.com, gregkh@linuxfoundation.org, bigeasy@linutronix.de, rgoldwyn@suse.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-aio@kvack.org, linux-api@vger.kernel.org, hch@infradread.org, jmoyer@redhat.com, willy@infradead.org, smfrench@gmail.com, Adam Manzanares Subject: [PATCH 1/2] fs: aio ioprio add explicit block layer dependence Date: Mon, 4 Jun 2018 10:59:56 -0700 Message-Id: <20180604175957.2647-1-adam.manzanares@wdc.com> X-Mailer: git-send-email 2.17.0 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: Adam Manzanares Previously, the ioprio_check_cap function was only defined when CONFIG_BLOCK was set. Make this relationship explicit and add a stub for !CONFIG_BLOCK. Signed-off-by: Adam Manzanares --- include/linux/ioprio.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h index 4a28cec49ec3..9e30ed6443db 100644 --- a/include/linux/ioprio.h +++ b/include/linux/ioprio.h @@ -77,6 +77,13 @@ extern int ioprio_best(unsigned short aprio, unsigned short bprio); extern int set_task_ioprio(struct task_struct *task, int ioprio); +#ifdef CONFIG_BLOCK extern int ioprio_check_cap(int ioprio); +#else +static inline int ioprio_check_cap(int ioprio) +{ + return -ENOTBLK; +} +#endif /* CONFIG_BLOCK */ #endif