Skip to contentSkip to conversation

pipe: remove CONFIG_WATCH_QUEUE for several protoypes

PATCH New Ben Dooks 1 participant 1 message Jun 16, 2023

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 pipe: remove CONFIG_WATCH_QUEUE for several protoypes

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?

---
 include/linux/pipe_fs_i.h | 2 --
 1 file changed, 2 deletions(-)
include/linux/pipe_fs_i.h +0 -2
index d2c3f16cf6b1..6a1e0b0fbcc3 100644
@@ -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
Signature · 1 line
2.39.2