summaryrefslogtreecommitdiffstats
path: root/lib/assoc_array.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2020-07-10 09:49:56 +0200
committerDavid Sterba <dsterba@suse.com>2020-07-27 12:55:44 +0200
commitf37c563bab4297024c300b05c8f48430e323809d (patch)
treedea02c9a4f8a93ffd131198b7235fb67bb41b838 /lib/assoc_array.c
parentbtrfs: don't traverse into the seed devices in show_devname (diff)
downloadlinux-f37c563bab4297024c300b05c8f48430e323809d.tar.xz
linux-f37c563bab4297024c300b05c8f48430e323809d.zip
btrfs: add missing check for nocow and compression inode flags
User Forza reported on IRC that some invalid combinations of file attributes are accepted by chattr. The NODATACOW and compression file flags/attributes are mutually exclusive, but they could be set by 'chattr +c +C' on an empty file. The nodatacow will be in effect because it's checked first in btrfs_run_delalloc_range. Extend the flag validation to catch the following cases: - input flags are conflicting - old and new flags are conflicting - initialize the local variable with inode flags after inode ls locked Inode attributes take precedence over mount options and are an independent setting. Nocompress would be a no-op with nodatacow, but we don't want to mix any compression-related options with nodatacow. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'lib/assoc_array.c')
0 files changed, 0 insertions, 0 deletions