btrfs: Simplify conditions about compress while mapping btrfs flags to inode flags
authorSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Tue, 15 Mar 2016 00:09:59 +0000 (09:09 +0900)
committerDavid Sterba <dsterba@suse.com>
Thu, 28 Apr 2016 08:36:54 +0000 (10:36 +0200)
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c

index 06fcc448108b56e526b862d233efaa1af8dbd7a8..0f76aea6e398e746fef83374aa9be021767f7a80 100644 (file)
@@ -125,10 +125,10 @@ static unsigned int btrfs_flags_to_ioctl(unsigned int flags)
        if (flags & BTRFS_INODE_NODATACOW)
                iflags |= FS_NOCOW_FL;
 
-       if ((flags & BTRFS_INODE_COMPRESS) && !(flags & BTRFS_INODE_NOCOMPRESS))
-               iflags |= FS_COMPR_FL;
-       else if (flags & BTRFS_INODE_NOCOMPRESS)
+       if (flags & BTRFS_INODE_NOCOMPRESS)
                iflags |= FS_NOCOMP_FL;
+       else if (flags & BTRFS_INODE_COMPRESS)
+               iflags |= FS_COMPR_FL;
 
        return iflags;
 }