Hello Kent Overstreet,
Commit a6508079b1b6 ("bcachefs: dirent_points_to_inode() now warns on
mismatch") from Sep 23, 2024 (linux-next), leads to the following
Smatch static checker warning:
fs/bcachefs/fsck.c:38 dirent_points_to_inode_nowarn()
warn: signedness bug returning '(-2157)'
fs/bcachefs/fsck.c
31 static bool dirent_points_to_inode_nowarn(struct bkey_s_c_dirent d,
^^^^
This is bool
32 struct bch_inode_unpacked *inode)
33 {
34 if (d.v->d_type == DT_SUBVOL
35 ? le32_to_cpu(d.v->d_child_subvol) == inode->bi_subvol
36 : le64_to_cpu(d.v->d_inum) == inode->bi_inum)
37 return 0;
--> 38 return -BCH_ERR_ENOENT_dirent_doesnt_match_inode;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39 }
regards,
dan carpenter