]> Gentwo Git Trees - linux/.git/commit
autofs: dont trigger mount if it cant succeed
authorIan Kent <raven@themaw.net>
Tue, 18 Nov 2025 02:46:31 +0000 (10:46 +0800)
committerChristian Brauner <brauner@kernel.org>
Wed, 19 Nov 2025 10:14:02 +0000 (11:14 +0100)
commit922a6f34c1756d2b0c35d9b2d915b8af19e85965
treec3eb198458480d3de60abd556e21039fc5b988de
parent3a8660878839faadb4f1a6dd72c3179c1df56787
autofs: dont trigger mount if it cant succeed

If a mount namespace contains autofs mounts, and they are propagation
private, and there is no namespace specific automount daemon to handle
possible automounting then attempted path resolution will loop until
MAXSYMLINKS is reached before failing causing quite a bit of noise in
the log.

Add a check for this in autofs ->d_automount() so that the VFS can
immediately return an error in this case. Since the mount is propagation
private an EPERM return seems most appropriate.

Suggested by: Christian Brauner <brauner@kernel.org>

Signed-off-by: Ian Kent <raven@themaw.net>
Link: https://patch.msgid.link/20251118024631.10854-2-raven@themaw.net
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/autofs/autofs_i.h
fs/autofs/dev-ioctl.c
fs/autofs/inode.c
fs/autofs/root.c
fs/namespace.c
include/linux/fs.h