diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-09-24 19:31:22 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-09-27 21:46:34 -0400 |
commit | b29c30ab48e0395a22ecf0b94443d16a8f493fb6 (patch) | |
tree | 543419a5b1692d6c21dfd154f9fa994cf7bbc00f /fs | |
parent | dc5bfdf8eaed76cf527c9477952c535f75e0e499 (diff) | |
download | linux-stable-b29c30ab48e0395a22ecf0b94443d16a8f493fb6.tar.gz linux-stable-b29c30ab48e0395a22ecf0b94443d16a8f493fb6.tar.bz2 linux-stable-b29c30ab48e0395a22ecf0b94443d16a8f493fb6.zip |
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: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/btree_node_scan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_node_scan.c b/fs/bcachefs/btree_node_scan.c index b28c649c6838..1e694fedc5da 100644 --- a/fs/bcachefs/btree_node_scan.c +++ b/fs/bcachefs/btree_node_scan.c @@ -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); |