Skip to content

Commit b0966e7

Browse files
nmtadamAl Viro
authored andcommitted
fs: aio ioprio add explicit block layer dependence
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 <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 087e566 commit b0966e7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/linux/ioprio.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ extern int ioprio_best(unsigned short aprio, unsigned short bprio);
7777

7878
extern int set_task_ioprio(struct task_struct *task, int ioprio);
7979

80+
#ifdef CONFIG_BLOCK
8081
extern int ioprio_check_cap(int ioprio);
82+
#else
83+
static inline int ioprio_check_cap(int ioprio)
84+
{
85+
return -ENOTBLK;
86+
}
87+
#endif /* CONFIG_BLOCK */
8188

8289
#endif

0 commit comments

Comments
 (0)