diff options
| author | Filipe Manana <[email protected]> | 2014-09-11 10:44:49 +0000 |
|---|---|---|
| committer | Chris Mason <[email protected]> | 2014-09-17 20:38:23 +0000 |
| commit | 78a017a2c92df9b571db0a55a016280f9019c65e (patch) | |
| tree | 777534b2e6b413d401f1fb212d4e24dcfc56dbd0 /fs/btrfs/dev-replace.c | |
| parent | btrfs: Fix a deadlock in btrfs_dev_replace_finishing() (diff) | |
| download | kernel-78a017a2c92df9b571db0a55a016280f9019c65e.tar.gz kernel-78a017a2c92df9b571db0a55a016280f9019c65e.zip | |
Btrfs: add missing compression property remove in btrfs_ioctl_setflags
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 <[email protected]>
Signed-off-by: Filipe Manana <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions
