Эх сурвалжийг харах

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>
Satoru Takeuchi 9 жил өмнө
parent
commit
13f48dc909
1 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 3 3
      fs/btrfs/ioctl.c

+ 3 - 3
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;
 }