summaryrefslogtreecommitdiffstats
path: root/fs/mount.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-08-08 13:08:20 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-10-09 02:38:53 -0400
commit9ea459e110df32e60a762f311f7939eaa879601d (patch)
tree3c25c8c4dbe1c21d92ab8e5a52b02c95453490d4 /fs/mount.h
parentb3ca406f2755c20cea1cc1169672c56dd03c266c (diff)
downloadop-kernel-dev-9ea459e110df32e60a762f311f7939eaa879601d.zip
op-kernel-dev-9ea459e110df32e60a762f311f7939eaa879601d.tar.gz
delayed mntput
On final mntput() we want fs shutdown to happen before return to userland; however, the only case where we want it happen right there (i.e. where task_work_add won't do) is MNT_INTERNAL victim. Those have to be fully synchronous - failure halfway through module init might count on having vfsmount killed right there. Fortunately, final mntput on MNT_INTERNAL vfsmounts happens on shallow stack. So we handle those synchronously and do an analog of delayed fput logics for everything else. As the result, we are guaranteed that fs shutdown will always happen on shallow stack. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/mount.h')
-rw-r--r--fs/mount.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/mount.h b/fs/mount.h
index 6740a62..8f2a14a 100644
--- a/fs/mount.h
+++ b/fs/mount.h
@@ -29,7 +29,10 @@ struct mount {
struct mount *mnt_parent;
struct dentry *mnt_mountpoint;
struct vfsmount mnt;
- struct rcu_head mnt_rcu;
+ union {
+ struct rcu_head mnt_rcu;
+ struct llist_node mnt_llist;
+ };
#ifdef CONFIG_SMP
struct mnt_pcp __percpu *mnt_pcp;
#else
OpenPOWER on IntegriCloud