]> git.baikalelectronics.ru Git - kernel.git/commit
fix autofs/afs/etc. magic mountpoint breakage
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 23 Dec 2009 04:45:11 +0000 (23:45 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 14 Jan 2010 14:05:25 +0000 (09:05 -0500)
commitdce8ae73a7aec6433071c224279bf033a8b65b11
treef589566363ef4f77098eba9ced48325f410168e6
parenta884e4849fbcb1504ee625a069f917f71a883ee5
fix autofs/afs/etc. magic mountpoint breakage

We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
if /mnt/tmp is an autofs direct mount.  The reason is that nd.last_type
is bogus here; we want LAST_BIND for everything of that kind and we
get LAST_NORM left over from finding parent directory.

So make sure that it *is* set properly; set to LAST_BIND before
doing ->follow_link() - for normal symlinks it will be changed
by __vfs_follow_link() and everything else needs it set that way.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c
fs/proc/base.c