Merge branch 'for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
[sfrench/cifs-2.6.git] / fs / btrfs / props.c
index f6a05f8366297ef791f74de39f2a884972dfb7a7..b30a056963ab91a5f110d0a034bd5bd81adeb9f1 100644 (file)
@@ -164,7 +164,6 @@ static int iterate_object_props(struct btrfs_root *root,
                                                 size_t),
                                void *ctx)
 {
-       struct btrfs_fs_info *fs_info = root->fs_info;
        int ret;
        char *name_buf = NULL;
        char *value_buf = NULL;
@@ -215,12 +214,6 @@ static int iterate_object_props(struct btrfs_root *root,
                        name_ptr = (unsigned long)(di + 1);
                        data_ptr = name_ptr + name_len;
 
-                       if (verify_dir_item(fs_info, leaf,
-                                           path->slots[0], di)) {
-                               ret = -EIO;
-                               goto out;
-                       }
-
                        if (name_len <= XATTR_BTRFS_PREFIX_LEN ||
                            memcmp_extent_buffer(leaf, XATTR_BTRFS_PREFIX,
                                                 name_ptr,
@@ -430,11 +423,11 @@ static const char *prop_compression_extract(struct inode *inode)
 {
        switch (BTRFS_I(inode)->prop_compress) {
        case BTRFS_COMPRESS_ZLIB:
-               return "zlib";
        case BTRFS_COMPRESS_LZO:
-               return "lzo";
        case BTRFS_COMPRESS_ZSTD:
-               return "zstd";
+               return btrfs_compress_type2str(BTRFS_I(inode)->prop_compress);
+       default:
+               break;
        }
 
        return NULL;