Skip to content

Commit

Permalink
Btrfs: fix overlap of fs_info::flags values
Browse files Browse the repository at this point in the history
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 171938e ("btrfs: track exclusive filesystem operation in flags")

Next, the value of BTRFS_FS_QUOTA_OVERRIDE was set to 14.

  commit f29efe2 ("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: f29efe2 ("btrfs: add quota override flag to enable quota override for CAP_SYS_RESOURCE")
CC: [email protected] # 4.13+
Signed-off-by: Tsutomu Itoh <[email protected]>
Reviewed-by: David Sterba <[email protected]>
[ minimize the change, update only BTRFS_FS_EXCL_OP ]
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
Tsutomu Itoh authored and kdave committed Oct 4, 2017
1 parent 2d8ce70 commit 69ad597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ struct btrfs_delayed_root;
* Indicate that a whole-filesystem exclusive operation is running
* (device replace, resize, device add/delete, balance)
*/
#define BTRFS_FS_EXCL_OP 14
#define BTRFS_FS_EXCL_OP 16

struct btrfs_fs_info {
u8 fsid[BTRFS_FSID_SIZE];
Expand Down

0 comments on commit 69ad597

Please sign in to comment.