btrfs: add helpers for compression type and level
[sfrench/cifs-2.6.git] / fs / btrfs / compression.c
index 548057630b69e9735d75eb1426869c85c0e521e9..94a0b0a3a301e880f768576f3b9599be2dddc7c6 100644 (file)
@@ -1036,9 +1036,9 @@ int btrfs_compress_pages(unsigned int type_level, struct address_space *mapping,
                         unsigned long *total_in,
                         unsigned long *total_out)
 {
+       int type = btrfs_compress_type(type_level);
        struct list_head *workspace;
        int ret;
-       int type = type_level & 0xF;
 
        workspace = find_workspace(type);