diff options
| author | Ian Kent <raven@themaw.net> | 2025-11-18 10:46:31 +0800 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-11-19 11:14:02 +0100 |
| commit | 922a6f34c1756d2b0c35d9b2d915b8af19e85965 (patch) | |
| tree | c3eb198458480d3de60abd556e21039fc5b988de /fs/namespace.c | |
| parent | 3a8660878839faadb4f1a6dd72c3179c1df56787 (diff) | |
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>
Diffstat (limited to 'fs/namespace.c')
| -rw-r--r-- | fs/namespace.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index d82910f33dc4..27bb12693cba 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -5150,6 +5150,12 @@ static u64 mnt_to_propagation_flags(struct mount *m) return propagation; } +u64 vfsmount_to_propagation_flags(struct vfsmount *mnt) +{ + return mnt_to_propagation_flags(real_mount(mnt)); +} +EXPORT_SYMBOL_GPL(vfsmount_to_propagation_flags); + static void statmount_sb_basic(struct kstatmount *s) { struct super_block *sb = s->mnt->mnt_sb; |