Commit b29c30ab authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Fix incorrect IS_ERR_OR_NULL usage



Returning a positive integer instead of an error code causes error paths
to become very confused.

Closes: syzbot+c0360e8367d6d8d04a66@syzkaller.appspotmail.com
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent dc5bfdf8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -275,7 +275,7 @@ static int read_btree_nodes(struct find_btree_nodes *f)
		w->ca		= ca;

		t = kthread_run(read_btree_nodes_worker, w, "read_btree_nodes/%s", ca->name);
		ret = IS_ERR_OR_NULL(t);
		ret = PTR_ERR_OR_ZERO(t);
		if (ret) {
			percpu_ref_put(&ca->io_ref);
			closure_put(&cl);