aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/mount.h
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2020-06-04 10:48:19 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2020-06-04 10:48:19 +0200
commitdf820f8de4e481222b17f9bcee7b909ae8167529 (patch)
tree8410725a7cd85f540f59120710b8617c18348670 /include/linux/mount.h
parentovl: get rid of redundant members in struct ovl_fs (diff)
downloadwireguard-linux-df820f8de4e481222b17f9bcee7b909ae8167529.tar.xz
wireguard-linux-df820f8de4e481222b17f9bcee7b909ae8167529.zip
ovl: make private mounts longterm
Overlayfs is using clone_private_mount() to create internal mounts for underlying layers. These are used for operations requiring a path, such as dentry_open(). Since these private mounts are not in any namespace they are treated as short term, "detached" mounts and mntput() involves taking the global mount_lock, which can result in serious cacheline pingpong. Make these private mounts longterm instead, which trade the penalty on mntput() for a slightly longer shutdown time due to an added RCU grace period when putting these mounts. Introduce a new helper kern_unmount_many() that can take care of multiple longterm mounts with a single RCU grace period. Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'include/linux/mount.h')
-rw-r--r--include/linux/mount.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mount.h b/include/linux/mount.h
index bf8cc4108b8f..8de95a0bec8d 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -109,4 +109,6 @@ extern unsigned int sysctl_mount_max;
extern bool path_is_mountpoint(const struct path *path);
+extern void kern_unmount_array(struct vfsmount *mnt[], unsigned int num);
+
#endif /* _LINUX_MOUNT_H */