Al Viro c64cd6e34e reimplement path_mountpoint() with less magic
... and get rid of a bunch of bugs in it.  Background:
the reason for path_mountpoint() is that umount() really doesn't
want attempts to revalidate the root of what it's trying to umount.
The thing we want to avoid actually happen from complete_walk();
solution was to do something parallel to normal path_lookupat()
and it both went overboard and got the boilerplate subtly
(and not so subtly) wrong.

A better solution is to do pretty much what the normal path_lookupat()
does, but instead of complete_walk() do unlazy_walk().  All it takes
to avoid that ->d_weak_revalidate() call...  mountpoint_last() goes
away, along with everything it got wrong, and so does the magic around
LOOKUP_NO_REVAL.

Another source of bugs is that when we traverse mounts at the final
location (and we need to do that - umount . expects to get whatever's
overmounting ., if any, out of the lookup) we really ought to take
care of ->d_manage() - as it is, manual umount of autofs automount
in progress can lead to unpleasant surprises for the daemon.  Easily
solved by using handle_lookup_down() instead of follow_mount().

Tested-by: Ian Kent <raven@themaw.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2020-01-15 01:36:06 -05:00
..
2017-11-17 14:18:00 -08:00
2017-11-17 14:18:00 -08:00
2019-09-26 12:20:14 -07:00
2019-02-20 15:14:21 -05:00
2019-11-03 21:28:44 -05:00
2019-11-03 21:28:44 -05:00
2019-11-18 11:04:32 +01:00
2019-11-06 08:55:23 -05:00
2015-04-23 15:16:14 -04:00
2019-11-18 11:04:32 +01:00
2019-11-18 11:04:32 +01:00
2019-11-06 08:55:23 -05:00
2019-10-09 12:05:49 -04:00
2019-08-27 10:24:56 -04:00
2019-08-26 15:31:29 -04:00
2019-11-18 10:37:58 +01:00