summaryrefslogtreecommitdiff
path: root/fs/bcachefs/thread_with_file.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-02-07 22:39:03 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-03-14 04:22:10 +0300
commit1cbae651e5c875f4d128211b3c732ee545f45424 (patch)
tree611bcce0b30736e2312cb8842f2da40223bf371e /fs/bcachefs/thread_with_file.h
parentfcb1620edd4d59eff4b3466be1d61263cea958a8 (diff)
downloadlinux-1cbae651e5c875f4d128211b3c732ee545f45424.tar.xz
bcachefs: thread_with_file: fix various printf problems
Experimentally fix some problems with stdio_redirect_vprintf by creating a MOO variant with which we can experiment. We can't do a GFP_KERNEL allocation while holding the spinlock, and I don't like how the printf function can silently truncate the output if memory allocation fails. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/thread_with_file.h')
-rw-r--r--fs/bcachefs/thread_with_file.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/thread_with_file.h b/fs/bcachefs/thread_with_file.h
index 2b687723d6b9..e20f2d17ee59 100644
--- a/fs/bcachefs/thread_with_file.h
+++ b/fs/bcachefs/thread_with_file.h
@@ -65,7 +65,7 @@ int bch2_run_thread_with_stdout(struct thread_with_stdio *,
int bch2_stdio_redirect_read(struct stdio_redirect *, char *, size_t);
int bch2_stdio_redirect_readline(struct stdio_redirect *, char *, size_t);
-__printf(3, 0) void bch2_stdio_redirect_vprintf(struct stdio_redirect *, bool, const char *, va_list);
-__printf(3, 4) void bch2_stdio_redirect_printf(struct stdio_redirect *, bool, const char *, ...);
+__printf(3, 0) ssize_t bch2_stdio_redirect_vprintf(struct stdio_redirect *, bool, const char *, va_list);
+__printf(3, 4) ssize_t bch2_stdio_redirect_printf(struct stdio_redirect *, bool, const char *, ...);
#endif /* _BCACHEFS_THREAD_WITH_FILE_H */