Skip to contentSkip to conversation

Patch "Btrfs: fix overlap of fs_info::flags values" has been added to the 4.13-stable tree

PATCH [email protected] 1 participant 1 message Oct 10, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

Btrfs: fix overlap of fs_info::flags values

to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
btrfs-fix-overlap-of-fs_info-flags-values.patch
and it can be found in the queue-4.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 69ad59767d094752c23c0fc180a79532fde073d0 Mon Sep 17 00:00:00 2001

From: Tsutomu Itoh <[email protected]>
Date: Wed, 4 Oct 2017 11:05:17 +0900
Subject: Btrfs: fix overlap of fs_info::flags values

From: Tsutomu Itoh <[email protected]>

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")
[ minimize the change, update only BTRFS_FS_EXCL_OP ]
---
 fs/btrfs/ctree.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/ctree.h +1 -1
@@ -723,7 +723,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];

Patches currently in stable-queue which might be from [email protected] are

queue-4.13/btrfs-fix-overlap-of-fs_info-flags-values.patch