vfs: add notifications for mount attach and detach

Add notifications for attaching and detaching mounts to fs/namespace.c

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Link: https://lore.kernel.org/r/20250129165803.72138-4-mszeredi@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Miklos Szeredi
2025-01-29 17:58:01 +01:00
committed by Christian Brauner
parent 0f46d81f2b
commit bf630c4016
3 changed files with 101 additions and 2 deletions

View File

@@ -549,8 +549,10 @@ static void restore_mounts(struct list_head *to_restore)
mp = parent->mnt_mp;
parent = parent->mnt_parent;
}
if (parent != mnt->mnt_parent)
if (parent != mnt->mnt_parent) {
mnt_change_mountpoint(parent, mp, mnt);
mnt_notify_add(mnt);
}
}
}