Btrfs: fix incompat flags setting
authorLi Zefan <lizefan@huawei.com>
Mon, 11 Jun 2012 09:10:51 +0000 (17:10 +0800)
committerChris Mason <chris.mason@oracle.com>
Fri, 15 Jun 2012 01:30:57 +0000 (21:30 -0400)
It's a bug, but it happens to work, as BTRFS_COMPRESS_LZO == 2, which
has only one bit set.

Signed-off-by: Li Zefan <lizefan@huawei.com>
fs/btrfs/disk-io.c

index 1c9664b16cd19840256fbe47a5a3f45a2e78a83a..9a569aef72eafa6586d768c9969c46de1341c60f 100644 (file)
@@ -2119,7 +2119,7 @@ int open_ctree(struct super_block *sb,
 
        features = btrfs_super_incompat_flags(disk_super);
        features |= BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF;
-       if (tree_root->fs_info->compress_type & BTRFS_COMPRESS_LZO)
+       if (tree_root->fs_info->compress_type == BTRFS_COMPRESS_LZO)
                features |= BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO;
 
        /*