diff options
author | Filipe Manana <fdmanana@suse.com> | 2014-09-11 14:44:49 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-30 19:40:08 +0300 |
commit | 31b89b447667bb9fb64239118203715d4fbb0c2f (patch) | |
tree | d77591c22320213197c3fc5e9cf92148c865ff86 /fs/xfs/xfs_ioctl.c | |
parent | 88579aa52d4ab60e5d737977d0a51e948dd91fc7 (diff) | |
download | linux-31b89b447667bb9fb64239118203715d4fbb0c2f.tar.xz |
Btrfs: add missing compression property remove in btrfs_ioctl_setflags
commit 78a017a2c92df9b571db0a55a016280f9019c65e upstream.
The behaviour of a 'chattr -c' consists of getting the current flags,
clearing the FS_COMPR_FL bit and then sending the result to the set
flags ioctl - this means the bit FS_NOCOMP_FL isn't set in the flags
passed to the ioctl. This results in the compression property not being
cleared from the inode - it was cleared only if the bit FS_NOCOMP_FL
was set in the received flags.
Reproducer:
$ mkfs.btrfs -f /dev/sdd
$ mount /dev/sdd /mnt && cd /mnt
$ mkdir a
$ chattr +c a
$ touch a/file
$ lsattr a/file
--------c------- a/file
$ chattr -c a
$ touch a/file2
$ lsattr a/file2
--------c------- a/file2
$ lsattr -d a
---------------- a
Reported-by: Andreas Schneider <asn@cryptomilk.org>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
0 files changed, 0 insertions, 0 deletions