mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs: stub out ioprio_check_cap for !CONFIG_BLOCK
@ 2018-06-05 11:47 Arnd Bergmann
  2018-06-05 11:59 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2018-06-05 11:47 UTC (permalink / raw)
  To: Al Viro
  Cc: Jeff Moyer, Christoph Hellwig, Adam Manzanares, Arnd Bergmann,
	Ingo Molnar, Peter Zijlstra (Intel),
	Sebastian Andrzej Siewior, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fs: stub out ioprio_check_cap for !CONFIG_BLOCK
  2018-06-05 11:47 [PATCH] fs: stub out ioprio_check_cap for !CONFIG_BLOCK Arnd Bergmann
@ 2018-06-05 11:59 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2018-06-05 11:59 UTC (permalink / raw)
  To: Al Viro
  Cc: Jeff Moyer, Christoph Hellwig, Adam Manzanares, Arnd Bergmann,
	Ingo Molnar, Peter Zijlstra (Intel),
	Sebastian Andrzej Siewior, Linux Kernel Mailing List

On Tue, Jun 5, 2018 at 1:47 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> 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.

Nevermind, I just saw a different patch fixes this in today's linux-next

       Arnd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-05 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-05 11:47 [PATCH] fs: stub out ioprio_check_cap for !CONFIG_BLOCK Arnd Bergmann
2018-06-05 11:59 ` Arnd Bergmann

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®