summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/dirent.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-12-17 03:16:34 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-01 17:47:41 +0100
commit038fecc045932171e882a4e3668208c28f66f795 (patch)
treec09848098eabaf9d389632f392bf68a547bce3a8 /fs/bcachefs/dirent.c
parentbcachefs: bch_err_(fn|msg) check if should print (diff)
downloadlinux-038fecc045932171e882a4e3668208c28f66f795.tar.xz
linux-038fecc045932171e882a4e3668208c28f66f795.zip
bcachefs: qstr_eq()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/dirent.c')
-rw-r--r--fs/bcachefs/dirent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/dirent.c b/fs/bcachefs/dirent.c
index 580c1c95361e..78ce9634d05c 100644
--- a/fs/bcachefs/dirent.c
+++ b/fs/bcachefs/dirent.c
@@ -65,7 +65,7 @@ static bool dirent_cmp_key(struct bkey_s_c _l, const void *_r)
const struct qstr l_name = bch2_dirent_get_name(l);
const struct qstr *r_name = _r;
- return l_name.len - r_name->len ?: memcmp(l_name.name, r_name->name, l_name.len);
+ return !qstr_eq(l_name, *r_name);
}
static bool dirent_cmp_bkey(struct bkey_s_c _l, struct bkey_s_c _r)
@@ -75,7 +75,7 @@ static bool dirent_cmp_bkey(struct bkey_s_c _l, struct bkey_s_c _r)
const struct qstr l_name = bch2_dirent_get_name(l);
const struct qstr r_name = bch2_dirent_get_name(r);
- return l_name.len - r_name.len ?: memcmp(l_name.name, r_name.name, l_name.len);
+ return !qstr_eq(l_name, r_name);
}
static bool dirent_is_visible(subvol_inum inum, struct bkey_s_c k)