Skip to contentSkip to conversation

vfs fixes

GIT PULL Merged Christian Brauner 2 participants 2 messages Apr 3, 2023 VFS

lore
Share & tools
lore

Christian Brauner

author maintainer
#0 lore raw

Hey Linus,

/* Summary */
When a mount or mount tree is made shared the vfs allocates new peer group ids for all mounts that have no peer group id set. Only mounts that aren't marked with MNT_SHARED are relevant here as MNT_SHARED indicates that the mount has fully transitioned to a shared mount. The peer group id handling is done with namespace lock held.

On failure, the peer group id settings of mounts for which a new peer group id was allocated need to be reverted and the allocated peer group id freed. The cleanup_group_ids() helper can identify the mounts to cleanup by checking whether a given mount has a peer group id set but isn't marked MNT_SHARED. The deallocation always needs to happen with namespace lock held to protect against concurrent modifications of the propagation settings.

This pull request contains a fix for the one place where the namespace lock was dropped before calling cleanup_group_ids().

/* Testing */
clang: Ubuntu clang version 15.0.6
gcc: gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0

All patches are based on v6.3-rc4 and have been sitting in linux-next. No build failures or warnings were observed. All old and new tests in fstests, selftests, and LTP pass without regressions.

/* Conflicts */
At the time of creating this PR no merge conflicts were reported from linux-next and no merge conflicts showed up doing a test-merge with current mainline.

The following changes since commit 197b6b60ae7bc51dd0814953c562833143b292aa:

Linux 6.3-rc4 (2023-03-26 14:40:20 -0700)

are available in the Git repository at:

ssh://[email protected]/pub/scm/linux/kernel/git/vfs/idmapping.git tags/vfs.misc.fixes.v6.3-rc6

for you to fetch changes up to cb2239c198ad9fbd5aced22cf93e45562da781eb:

fs: drop peer group ids under namespace lock (2023-03-31 12:13:37 +0200)

Please consider pulling these changes from the signed vfs.misc.fixes.v6.3-rc6 tag.

Thanks!
Christian

----------------------------------------------------------------
vfs.misc.fixes.v6.3-rc6

----------------------------------------------------------------
Christian Brauner (1):
fs: drop peer group ids under namespace lock

 fs/namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
merge bot Merged
#1 lore raw
The pull request you sent on Mon, 3 Apr 2023 13:04:58 +0200:

The pull request you sent on Mon, 3 Apr 2023 13:04:58 +0200:

Quoted 1 line

ssh://[email protected]/pub/scm/linux/kernel/git/vfs/idmapping.git tags/vfs.misc.fixes.v6.3-rc6

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/148341f0a2f53b5e8808d093333d85170586a15d

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html