Skip to content

Commit 6be2e11

Browse files
arndbsmb49
authored andcommitted
fs: pipe: reveal missing function protoypes
BugLink: https://bugs.launchpad.net/bugs/2032689 [ Upstream commit 247c8d2 ] A couple of functions from fs/pipe.c are used both internally and for the watch queue code, but the declaration is only visible when the latter is enabled: fs/pipe.c:1254:5: error: no previous prototype for 'pipe_resize_ring' fs/pipe.c:758:15: error: no previous prototype for 'account_pipe_buffers' fs/pipe.c:764:6: error: no previous prototype for 'too_many_pipe_buffers_soft' fs/pipe.c:771:6: error: no previous prototype for 'too_many_pipe_buffers_hard' fs/pipe.c:777:6: error: no previous prototype for 'pipe_is_unprivileged_user' Make the visible unconditionally to avoid these warnings. Fixes: c73be61 ("pipe: Add general notification queue support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Message-Id: <20230516195629.551602-1-arnd@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent f2005ca commit 6be2e11

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

include/linux/pipe_fs_i.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,18 +265,14 @@ void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *);
265265

266266
extern const struct pipe_buf_operations nosteal_pipe_buf_ops;
267267

268-
#ifdef CONFIG_WATCH_QUEUE
269268
unsigned long account_pipe_buffers(struct user_struct *user,
270269
unsigned long old, unsigned long new);
271270
bool too_many_pipe_buffers_soft(unsigned long user_bufs);
272271
bool too_many_pipe_buffers_hard(unsigned long user_bufs);
273272
bool pipe_is_unprivileged_user(void);
274-
#endif
275273

276274
/* for F_SETPIPE_SZ and F_GETPIPE_SZ */
277-
#ifdef CONFIG_WATCH_QUEUE
278275
int pipe_resize_ring(struct pipe_inode_info *pipe, unsigned int nr_slots);
279-
#endif
280276
long pipe_fcntl(struct file *, unsigned int, unsigned long arg);
281277
struct pipe_inode_info *get_pipe_info(struct file *file, bool for_splice);
282278

0 commit comments

Comments
 (0)