From: Satoru Takeuchi Date: Tue, 15 Mar 2016 00:09:59 +0000 (+0900) Subject: btrfs: Simplify conditions about compress while mapping btrfs flags to inode flags X-Git-Tag: v4.7-rc1~85^2~1^2~2^2~8 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=13f48dc9094b56c5bffd8d57349a0a01a1926b2d;p=karo-tx-linux.git btrfs: Simplify conditions about compress while mapping btrfs flags to inode flags Signed-off-by: Satoru Takeuchi Signed-off-by: David Sterba --- diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 06fcc448108b..0f76aea6e398 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -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; }