summaryrefslogtreecommitdiff
path: root/fs/bcachefs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/super.c')
-rw-r--r--fs/bcachefs/super.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c
index 0f3a924ca1f9..64ff7da49860 100644
--- a/fs/bcachefs/super.c
+++ b/fs/bcachefs/super.c
@@ -88,14 +88,11 @@ const char * const bch2_fs_flag_strs[] = {
void __bch2_print(struct bch_fs *c, const char *fmt, ...)
{
- struct log_output *output = c->output;
- va_list args;
-
- if (c->output_filter && c->output_filter != current)
- output = NULL;
+ struct stdio_redirect *stdio = bch2_fs_stdio_redirect(c);
+ va_list args;
va_start(args, fmt);
- if (likely(!output)) {
+ if (likely(!stdio)) {
vprintk(fmt, args);
} else {
unsigned long flags;
@@ -103,11 +100,11 @@ void __bch2_print(struct bch_fs *c, const char *fmt, ...)
if (fmt[0] == KERN_SOH[0])
fmt += 2;
- spin_lock_irqsave(&output->lock, flags);
- prt_vprintf(&output->buf, fmt, args);
- spin_unlock_irqrestore(&output->lock, flags);
+ spin_lock_irqsave(&stdio->output_lock, flags);
+ prt_vprintf(&stdio->output_buf, fmt, args);
+ spin_unlock_irqrestore(&stdio->output_lock, flags);
- wake_up(&output->wait);
+ wake_up(&stdio->output_wait);
}
va_end(args);
}
@@ -724,7 +721,7 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts opts)
goto out;
}
- c->output = (void *)(unsigned long) opts.log_output;
+ c->stdio = (void *)(unsigned long) opts.stdio;
__module_get(THIS_MODULE);