]> git.baikalelectronics.ru Git - kernel.git/commit
delayed mntput
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 8 Aug 2014 17:08:20 +0000 (13:08 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 9 Oct 2014 06:38:53 +0000 (02:38 -0400)
commit0aae7cbd158432a01f9cbf9c0259fe5824465b76
tree3c25c8c4dbe1c21d92ab8e5a52b02c95453490d4
parent423dfda114b7e70a4761249dbb4ce017f5136546
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>
fs/mount.h
fs/namespace.c