Skip to content

Commit b29c30a

Browse files
author
Kent Overstreet
committed
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: [email protected] Signed-off-by: Kent Overstreet <[email protected]>
1 parent dc5bfdf commit b29c30a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/bcachefs/btree_node_scan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ static int read_btree_nodes(struct find_btree_nodes *f)
275275
w->ca = ca;
276276

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

0 commit comments

Comments
 (0)