[GIT PULL 15/17 for v6.19] autofs

From: Christian Brauner

Date: Fri Nov 28 2025 - 11:51:34 EST


Hey Linus,

/* Summary */
Prevent Futile Mount Triggers in Private Mount Namespaces

Fix a problematic loop in autofs when a mount namespace contains autofs
mounts that are propagation private and there is no namespace-specific
automount daemon to handle possible automounting.

Previously, attempted path resolution would loop until MAXSYMLINKS was
reached before failing, causing significant noise in the log.

The fix adds a check in autofs ->d_automount() so that the VFS can
immediately return EPERM in this case. Since the mount is propagation
private, EPERM is the most appropriate error code.

/* Testing */

gcc (Debian 14.2.0-19) 14.2.0
Debian clang version 19.1.7 (3+b1)

No build failures or warnings were observed.

/* Conflicts */

Merge conflicts with mainline
=============================

No known conflicts.

Merge conflicts with other trees
================================

[1]: https://lore.kernel.org/linux-next/20251121153059.48e3d2fa@xxxxxxxxxxxxxxxx

The following changes since commit 3a8660878839faadb4f1a6dd72c3179c1df56787:

Linux 6.18-rc1 (2025-10-12 13:42:36 -0700)

are available in the Git repository at:

git@xxxxxxxxxxxxxxxxxxx:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.19-rc1.autofs

for you to fetch changes up to 922a6f34c1756d2b0c35d9b2d915b8af19e85965:

autofs: dont trigger mount if it cant succeed (2025-11-19 11:14:02 +0100)

Please consider pulling these changes from the signed vfs-6.19-rc1.autofs tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.19-rc1.autofs

----------------------------------------------------------------
Ian Kent (1):
autofs: dont trigger mount if it cant succeed

fs/autofs/autofs_i.h | 5 +++++
fs/autofs/dev-ioctl.c | 1 +
fs/autofs/inode.c | 1 +
fs/autofs/root.c | 8 ++++++++
fs/namespace.c | 6 ++++++
include/linux/fs.h | 1 +
6 files changed, 22 insertions(+)