linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 <adam.manzanares@wdc.com>
Subject: [PATCH 1/2] fs: aio ioprio add explicit block layer dependence
Date: Mon,  4 Jun 2018 10:59:56 -0700	[thread overview]
Message-ID: <20180604175957.2647-1-adam.manzanares@wdc.com> (raw)

From: Adam Manzanares <adam.manzanares@wdc.com>

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 <adam.manzanares@wdc.com>
---
 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
-- 
2.17.0

             reply	other threads:[~2018-06-04 18:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 17:59 adam.manzanares [this message]
2018-06-04 17:59 ` [PATCH 2/2] fs: aio ioprio use ioprio_check_cap ret val adam.manzanares

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=20180604175957.2647-1-adam.manzanares@wdc.com \
    --to=adam.manzanares@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=bcrl@kvack.org \
    --cc=bigeasy@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradread.org \
    --cc=jmoyer@redhat.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-aio@kvack.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pombredanne@nexb.com \
    --cc=rgoldwyn@suse.com \
    --cc=smfrench@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).