Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8556e509 authored by Josef Bacik's avatar Josef Bacik Committed by Alexei Starovoitov
Browse files

btrfs: make open_ctree error injectable



This allows us to do error injection with BPF for open_ctree.

Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
Acked-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 92ace999
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include <linux/ratelimit.h>
#include <linux/uuid.h>
#include <linux/semaphore.h>
#include <linux/bpf.h>
#include <asm/unaligned.h>
#include "ctree.h"
#include "disk-io.h"
@@ -3123,6 +3124,7 @@ int open_ctree(struct super_block *sb,
		goto fail_block_groups;
	goto retry_root_backup;
}
BPF_ALLOW_ERROR_INJECTION(open_ctree);

static void btrfs_end_buffer_write_sync(struct buffer_head *bh, int uptodate)
{