diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-25 09:59:35 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-06-01 05:03:17 +0300 |
commit | 237a8e16bd71cce84e0e3404e1ed8df2b5d63c7c (patch) | |
tree | 5829b741a9194b4ac6d1fc2cf658ea4d8da1b6c3 | |
parent | a0f7437906d115c3fff1b6242f57ca87262a879b (diff) | |
download | linux-237a8e16bd71cce84e0e3404e1ed8df2b5d63c7c.tar.xz |
bcachefs: CLASS(printbuf)
Add a DEFINE_CLASS() for printbufs.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/printbuf.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/bcachefs/printbuf.h b/fs/bcachefs/printbuf.h index 1ca476adbf6f..8f4e28d440ac 100644 --- a/fs/bcachefs/printbuf.h +++ b/fs/bcachefs/printbuf.h @@ -140,6 +140,14 @@ void bch2_prt_bitflags_vector(struct printbuf *, const char * const[], .size = _size, \ }) +static inline struct printbuf bch2_printbuf_init(void) +{ + return PRINTBUF; +} + +DEFINE_CLASS(printbuf, struct printbuf, + bch2_printbuf_exit(&_T), bch2_printbuf_init(), void) + /* * Returns size remaining of output buffer: */ |