]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
Btrfs: fix overlap of fs_info::flags values
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>
Wed, 4 Oct 2017 02:05:17 +0000 (11:05 +0900)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 19 Oct 2017 14:49:12 +0000 (09:49 -0500)
commit610ce99c5d70a261bd4c765ada709a7f98350228
treeae62ac1888f8a8958449a0264fc84a5fc179024a
parent0a03422c08534dbd0684870ace632114860ec7ac
Btrfs: fix overlap of fs_info::flags values

BugLink: http://bugs.launchpad.net/bugs/1723145
commit 69ad59767d094752c23c0fc180a79532fde073d0 upstream.

Because the values of BTRFS_FS_EXCL_OP and BTRFS_FS_QUOTA_OVERRIDE overlap,
we should change the value.

First, BTRFS_FS_EXCL_OP was set to 14.

  commit 171938e52807 ("btrfs: track exclusive filesystem operation in flags")

Next, the value of BTRFS_FS_QUOTA_OVERRIDE was set to 14.

  commit f29efe292198 ("btrfs: add quota override flag to enable quota override for CAP_SYS_RESOURCE")

As a result, the value 14 overlapped, by accident.
This problem is solved by defining the value of BTRFS_FS_EXCL_OP as 16,
the flags are internal.

Fixes: f29efe292198 ("btrfs: add quota override flag to enable quota override for CAP_SYS_RESOURCE")
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ minimize the change, update only BTRFS_FS_EXCL_OP ]
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/btrfs/ctree.h