summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>2016-03-15 09:09:59 +0900
committerDavid Sterba <dsterba@suse.com>2016-04-28 10:36:54 +0200
commit13f48dc9094b56c5bffd8d57349a0a01a1926b2d (patch)
treef7a4fa00d2b1e42f5600807d48764e309a1275e5 /fs/btrfs/ioctl.c
parentc5f4ccb2f77355ac44433feb362fecd7f1a7d03e (diff)
downloadop-kernel-dev-13f48dc9094b56c5bffd8d57349a0a01a1926b2d.zip
op-kernel-dev-13f48dc9094b56c5bffd8d57349a0a01a1926b2d.tar.gz
btrfs: Simplify conditions about compress while mapping btrfs flags to inode flags
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 06fcc44..0f76aea 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;
}
OpenPOWER on IntegriCloud