Re: [PATCH] btrfs: Simplify conditions about compress while mapping btrfs flags to inode flags

2016-03-19 Thread David Sterba
On Tue, Mar 15, 2016 at 09:09:59AM +0900, Satoru Takeuchi wrote:
> Signed-off-by: Satoru Takeuchi 

Reviewed-by: David Sterba 
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] btrfs: Simplify conditions about compress while mapping btrfs flags to inode flags

2016-03-14 Thread Satoru Takeuchi
Signed-off-by: Satoru Takeuchi 
---
This patch can be applied to 4.5
---
 fs/btrfs/ioctl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 48aee98..b474e32 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -123,10 +123,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;
 }
-- 
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html