From patchwork Tue Jun 5 11:47:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 137716 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp855224lji; Tue, 5 Jun 2018 04:48:39 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJXMp4VrBRp5LXnQVMGP73pJLSlUmEMr5+opmINf7yRnXvLPX2SEf/nW1vKW2gEG3FXK60E X-Received: by 2002:a62:cc51:: with SMTP id a78-v6mr25072198pfg.219.1528199319655; Tue, 05 Jun 2018 04:48:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528199319; cv=none; d=google.com; s=arc-20160816; b=Q6JgRZkUVypHibYpNure2/lVlprD2GTHtGlWiilhE42haaFDE3+kZyJmxUh2scyl3W RXTUcLNMlgJ0qz1OUAspi8RjshiPtDrhzoP5wVKAjAT9T2QgOdwNgujOySSWqVhGDcIq I4mnmJVlBMx7pHJqigqFWd+/pLkPBxlFDK0JYrX77ldDbWYTUqy35YGYaUcJsusBWOME qKf7W/9Kx3EOi6aduGXUM6H7CS5JU5HT988YYOclG4KwfeUUvSKVvY2LQVcE2HtlYX6V kze9KJh84OBnMFD3urnfAshhWnLWnG67FJpvd9TIKzbAb+QJHqrYUczro+aphwrxeY7J hOYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=S4Ceu2RkrzpDcngde5ejMMOf1HKwy+8Nxg4CDDH4BAU=; b=l7MXOrEfBwdkC5kDdGZ/jCQDK6N8FU0ML6/MwfdxBlhiFQ73jAaDXEAxd0bXBMVzvy zSkntWaaTqu6x6CR+FJyAtJI1Q2uTGGtk8e1yNzUibqeNTxbL6WfxkEWKAd1Ox833IeG GxCfbU2orTxrhAIwdp5TPAKtjb2ruhUY1vsI51Rg9/RjjWnkgBw3z9hWOEclZmIenD5b r8NL2YV+o8gxAtBysyOIN9PadVWsq8NYwiQ/hOp5kF85dBi5tNz9+KJrkmAqprN7RgSn hUMrqRVLHJ6Kp5If9KLpISmBUotZhAbaNbt9Zuiywy36CanhBqYkNZ71aIvQcIfLpQsn YS2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s136-v6si4214111pgc.291.2018.06.05.04.48.39; Tue, 05 Jun 2018 04:48:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751876AbeFELsg (ORCPT + 30 others); Tue, 5 Jun 2018 07:48:36 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:41369 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751572AbeFELsf (ORCPT ); Tue, 5 Jun 2018 07:48:35 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MDPjh-1fVt3z0jpl-00Go1t; Tue, 05 Jun 2018 13:48:06 +0200 From: Arnd Bergmann To: Al Viro Cc: Jeff Moyer , Christoph Hellwig , Adam Manzanares , Arnd Bergmann , Ingo Molnar , "Peter Zijlstra (Intel)" , Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org Subject: [PATCH] fs: stub out ioprio_check_cap for !CONFIG_BLOCK Date: Tue, 5 Jun 2018 13:47:41 +0200 Message-Id: <20180605114756.1517549-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:Y6L/cJLYaX+ZjLDaxOizSH3E7uGVjAFTZ2UlDqkmZauEtPBmZig 5ILglaIbLc65UDbAyFRETp00uxbh2CWQBsvCyAq4xFHRAJeqHPZ0ul0yDz8p2kf96pKEK0H NxEp+yLJAzRzxLVPhPAG9y/KxKEe5ayN586NzjYJctJz/0KgwieuNNf/9H1lQG5qqDMDjZc alc/lLG4lvnvMgX6KtHjw== X-UI-Out-Filterresults: notjunk:1; V01:K0:3YqM4I1y2Gw=:j5ajDEHEGqnkwxdVflfqcl qKHBxfBR+B//rWlCldTk7SubcDC5bzAhhqdqEld53bqFaiM1F3CWQECNZjxhX5FLFcw7fDJms FmuzDv9ObFCishWCjumbr909C8CAzVCvPcU9XM8BP7VnyL/zACD0a4t68nvioSl3Kjma0rT4b ok9CoaTNL4c73GcwCw+csg1faCA9nqnJzpSnotOTmu69+QcQIDC8WKf4ALG6SVsDscErFuvWC dmkoq9wi0oZDdipR/uKGhsVp/WlL+fOsRAUjVuu78x8vJh9K3Gphb3uMya24nPs/g37HS3nW1 PYULwQyA+JNrJ+byy/Svhm3cyddWYn/PGQZzpSMLB1dfLPAKmqWl3OgoGsZPDDRdqG63/UMuJ jVMpGaq5fDi4Kj/WlPN8K1a1rqzJKMiqI7lDe43scLxV/vYEqVoKTwSmZLFXYhokqVflkFV3n +FC3juBOTMQGGGR4SSads7nG8OzMNzWbUNXyHolsoKnH6nOdDE3ohm+hXBpqxjTi922fsjgam cCVZmmw59dbIVBkSSamJduNHsIpf1wNNZqmiDyLOpN7sxHSiw6yZyRIIUs0yM0F9/f6U1jtwN 4ebSnkhChA96Fk1qiQWqT/fGTNeJX4IsLsqOTuWzt1jk9f4cFMazY4wglzpIaBwrt3wcBXpP2 v+M+GzjMeTt3J4gkkppBm9X66mcBuSsM/L4e7J3sr2fK7rEqxGppjbfU/8ArqjeEC3pw= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_BLOCK is disabled, we now run into a link error: fs/aio.o: In function `aio_prep_rw': aio.c:(.text+0xf68): undefined reference to `ioprio_check_cap' Since the priorities are unused without block devices, this adds a stub that always returns success. Fixes: d9a08a9e616b ("fs: Add aio iopriority support") Signed-off-by: Arnd Bergmann --- Not sure if my assertion is correct, please check that returning zero actually makes sense here. --- include/linux/ioprio.h | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.9.0 diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h index 4a28cec49ec3..ccc2a44483b6 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 0; +} +#endif #endif