]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/xattr.c
Update bcachefs sources to 6a20aede29 bcachefs: Fix quotas + snapshots
[bcachefs-tools-debian] / libbcachefs / xattr.c
index 9f77bb2ecf5fe741aae306f3dee90efc94dc17b1..4fc6e065d4212c31962d502dd41e95a0b603e631 100644 (file)
@@ -75,12 +75,6 @@ int bch2_xattr_invalid(const struct bch_fs *c, struct bkey_s_c k,
        const struct xattr_handler *handler;
        struct bkey_s_c_xattr xattr = bkey_s_c_to_xattr(k);
 
-       if (bkey_val_bytes(k.k) < sizeof(struct bch_xattr)) {
-               prt_printf(err, "incorrect value size (%zu < %zu)",
-                      bkey_val_bytes(k.k), sizeof(*xattr.v));
-               return -BCH_ERR_invalid_bkey;
-       }
-
        if (bkey_val_u64s(k.k) <
            xattr_val_u64s(xattr.v->x_name_len,
                           le16_to_cpu(xattr.v->x_val_len))) {
@@ -378,7 +372,7 @@ static int bch2_xattr_get_handler(const struct xattr_handler *handler,
 }
 
 static int bch2_xattr_set_handler(const struct xattr_handler *handler,
-                                 struct user_namespace *mnt_userns,
+                                 struct mnt_idmap *idmap,
                                  struct dentry *dentry, struct inode *vinode,
                                  const char *name, const void *value,
                                  size_t size, int flags)
@@ -517,7 +511,7 @@ static int inode_opt_set_fn(struct bch_inode_info *inode,
 }
 
 static int bch2_xattr_bcachefs_set(const struct xattr_handler *handler,
-                                  struct user_namespace *mnt_userns,
+                                  struct mnt_idmap *idmap,
                                   struct dentry *dentry, struct inode *vinode,
                                   const char *name, const void *value,
                                   size_t size, int flags)