mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jeff Moyer <jmoyer@redhat.com>, Christoph Hellwig <hch@lst.de>,
	Adam Manzanares <adam.manzanares@wdc.com>,
	Arnd Bergmann <arnd@arndb.de>, Ingo Molnar <mingo@kernel.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	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	[thread overview]
Message-ID: <20180605114756.1517549-1-arnd@arndb.de> (raw)

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 <arnd@arndb.de>
---
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(+)

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
-- 
2.9.0

             reply	other threads:[~2018-06-05 11:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05 11:47 Arnd Bergmann [this message]
2018-06-05 11:59 ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180605114756.1517549-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=adam.manzanares@wdc.com \
    --cc=bigeasy@linutronix.de \
    --cc=hch@lst.de \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®