[PATCH v2 4/5] btrfs: don't allow -C or +c chattrs on a swap file

2014-11-21 Thread Omar Sandoval
swap_activate will check for a compressed or copy-on-write file; we shouldn't allow it to become either once it has already been activated. Signed-off-by: Omar Sandoval osan...@osandov.com --- fs/btrfs/ioctl.c | 50 +++--- 1 file changed, 31

Re: [PATCH v2 4/5] btrfs: don't allow -C or +c chattrs on a swap file

2014-11-21 Thread David Sterba
On Fri, Nov 21, 2014 at 02:08:30AM -0800, Omar Sandoval wrote: @@ -293,14 +293,21 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) } } else { You can put the condition here, instead of shifting the nested block. } else if