[PATCH] pipe: remove CONFIG_WATCH_QUEUE for several protoypes
From: Ben Dooks
Date: Fri Jun 16 2023 - 12:24:11 EST
There are several function protoypes in include/linux/pipe_fs_i.h which
are only declared for CONFIG_WATCH_QUEUE. However these seem to be used
even if this is not declared, and their implementations in fs/pipe.c are
not conditional on CONFIG_WATCH_QUEUE. Silence the following sparse warnings
by alwas defining these:
fs/pipe.c:759:15: warning: symbol 'account_pipe_buffers' was not declared. Should it be static?
fs/pipe.c:765:6: warning: symbol 'too_many_pipe_buffers_soft' was not declared. Should it be static?
fs/pipe.c:772:6: warning: symbol 'too_many_pipe_buffers_hard' was not declared. Should it be static?
fs/pipe.c:779:6: warning: symbol 'pipe_is_unprivileged_user' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx>
---
include/linux/pipe_fs_i.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index d2c3f16cf6b1..6a1e0b0fbcc3 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -261,13 +261,11 @@ void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *);
extern const struct pipe_buf_operations nosteal_pipe_buf_ops;
-#ifdef CONFIG_WATCH_QUEUE
unsigned long account_pipe_buffers(struct user_struct *user,
unsigned long old, unsigned long new);
bool too_many_pipe_buffers_soft(unsigned long user_bufs);
bool too_many_pipe_buffers_hard(unsigned long user_bufs);
bool pipe_is_unprivileged_user(void);
-#endif
/* for F_SETPIPE_SZ and F_GETPIPE_SZ */
#ifdef CONFIG_WATCH_QUEUE
--
2.39.2