Blame SOURCES/autofs-5.0.9-amd-lookup-try-to-use-external-mounts-for-nfs-mounts.patch

304803
autofs-5.0.9 - amd lookup try to use external mounts for nfs mounts
304803
304803
From: Ian Kent <raven@themaw.net>
304803
304803
When using nfs type mounts they may be mounted externally to avoid
304803
multiple instances of the mount.
304803
304803
The current usage doesn't always use external mounts when it can so,
304803
if option fs is defined, use an external.
304803
---
304803
 modules/parse_amd.c |    7 ++++++-
304803
 1 file changed, 6 insertions(+), 1 deletion(-)
304803
304803
diff --git a/modules/parse_amd.c b/modules/parse_amd.c
304803
index 0c708e6..becc519 100644
304803
--- a/modules/parse_amd.c
304803
+++ b/modules/parse_amd.c
304803
@@ -1011,7 +1011,7 @@ static int do_nfs_mount(struct autofs_point *ap, const char *name,
304803
 	if (proximity == PROXIMITY_OTHER && entry->remopts)
304803
 		opts = entry->remopts;
304803
 
304803
-	if (!entry->sublink) {
304803
+	if (!entry->fs) {
304803
 		ret = mount_nfs->mount_mount(ap, ap->path, name, strlen(name),
304803
 					     target, entry->type, opts,
304803
 					     mount_nfs->context);
304803
@@ -1214,6 +1214,11 @@ static unsigned int validate_nfs_options(unsigned int logopt,
304803
 			return 0;
304803
 		}
304803
 	}
304803
+	if (entry->sublink && !entry->fs) {
304803
+		error(logopt, MODPREFIX
304803
+		      "%s: sublink option requires option fs");
304803
+		return 0;
304803
+	}
304803
 	return 1;
304803
 }
304803