summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/inode.c')
-rw-r--r--fs/bcachefs/inode.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c
index 7ccbc00b7156..107210dd9c9a 100644
--- a/fs/bcachefs/inode.c
+++ b/fs/bcachefs/inode.c
@@ -437,12 +437,6 @@ int bch2_inode_invalid(const struct bch_fs *c, struct bkey_s_c k,
{
struct bkey_s_c_inode inode = bkey_s_c_to_inode(k);
- if (bkey_val_bytes(k.k) < sizeof(*inode.v)) {
- prt_printf(err, "incorrect value size (%zu < %zu)",
- bkey_val_bytes(k.k), sizeof(*inode.v));
- return -BCH_ERR_invalid_bkey;
- }
-
if (INODE_STR_HASH(inode.v) >= BCH_STR_HASH_NR) {
prt_printf(err, "invalid str hash type (%llu >= %u)",
INODE_STR_HASH(inode.v), BCH_STR_HASH_NR);
@@ -457,12 +451,6 @@ int bch2_inode_v2_invalid(const struct bch_fs *c, struct bkey_s_c k,
{
struct bkey_s_c_inode_v2 inode = bkey_s_c_to_inode_v2(k);
- if (bkey_val_bytes(k.k) < sizeof(*inode.v)) {
- prt_printf(err, "incorrect value size (%zu < %zu)",
- bkey_val_bytes(k.k), sizeof(*inode.v));
- return -BCH_ERR_invalid_bkey;
- }
-
if (INODEv2_STR_HASH(inode.v) >= BCH_STR_HASH_NR) {
prt_printf(err, "invalid str hash type (%llu >= %u)",
INODEv2_STR_HASH(inode.v), BCH_STR_HASH_NR);
@@ -477,12 +465,6 @@ int bch2_inode_v3_invalid(const struct bch_fs *c, struct bkey_s_c k,
{
struct bkey_s_c_inode_v3 inode = bkey_s_c_to_inode_v3(k);
- if (bkey_val_bytes(k.k) < sizeof(*inode.v)) {
- prt_printf(err, "incorrect value size (%zu < %zu)",
- bkey_val_bytes(k.k), sizeof(*inode.v));
- return -BCH_ERR_invalid_bkey;
- }
-
if (INODEv3_FIELDS_START(inode.v) < INODEv3_FIELDS_START_INITIAL ||
INODEv3_FIELDS_START(inode.v) > bkey_val_u64s(inode.k)) {
prt_printf(err, "invalid fields_start (got %llu, min %u max %zu)",
@@ -543,12 +525,6 @@ int bch2_inode_generation_invalid(const struct bch_fs *c, struct bkey_s_c k,
return -BCH_ERR_invalid_bkey;
}
- if (bkey_val_bytes(k.k) != sizeof(struct bch_inode_generation)) {
- prt_printf(err, "incorrect value size (%zu != %zu)",
- bkey_val_bytes(k.k), sizeof(struct bch_inode_generation));
- return -BCH_ERR_invalid_bkey;
- }
-
return 0;
}