|
|
b91b93 |
diff -up nfs-utils-2.3.3/utils/mount/Makefile.am.orig nfs-utils-2.3.3/utils/mount/Makefile.am
|
|
|
b91b93 |
--- nfs-utils-2.3.3/utils/mount/Makefile.am.orig 2018-09-06 14:09:08.000000000 -0400
|
|
|
b91b93 |
+++ nfs-utils-2.3.3/utils/mount/Makefile.am 2018-10-25 10:27:33.881804941 -0400
|
|
|
b91b93 |
@@ -27,6 +27,7 @@ endif
|
|
|
b91b93 |
|
|
|
b91b93 |
mount_nfs_LDADD = ../../support/nfs/libnfs.la \
|
|
|
b91b93 |
../../support/export/libexport.a \
|
|
|
b91b93 |
+ ../../support/misc/libmisc.a \
|
|
|
b91b93 |
$(LIBTIRPC)
|
|
|
b91b93 |
|
|
|
b91b93 |
mount_nfs_SOURCES = $(mount_common)
|
|
|
b91b93 |
diff -up nfs-utils-2.3.3/utils/mount/stropts.c.orig nfs-utils-2.3.3/utils/mount/stropts.c
|
|
|
b91b93 |
--- nfs-utils-2.3.3/utils/mount/stropts.c.orig 2018-09-06 14:09:08.000000000 -0400
|
|
|
b91b93 |
+++ nfs-utils-2.3.3/utils/mount/stropts.c 2018-10-25 10:27:59.733825016 -0400
|
|
|
b91b93 |
@@ -48,6 +48,7 @@
|
|
|
b91b93 |
#include "version.h"
|
|
|
b91b93 |
#include "parse_dev.h"
|
|
|
b91b93 |
#include "conffile.h"
|
|
|
b91b93 |
+#include "misc.h"
|
|
|
b91b93 |
|
|
|
b91b93 |
#ifndef NFS_PROGRAM
|
|
|
b91b93 |
#define NFS_PROGRAM (100003)
|
|
|
b91b93 |
@@ -1078,14 +1079,18 @@ static int nfsmount_fg(struct nfsmount_i
|
|
|
b91b93 |
if (nfs_try_mount(mi))
|
|
|
b91b93 |
return EX_SUCCESS;
|
|
|
b91b93 |
|
|
|
b91b93 |
- if (errno == EBUSY)
|
|
|
b91b93 |
- /* The only cause of EBUSY is if exactly the desired
|
|
|
b91b93 |
- * filesystem is already mounted. That can arguably
|
|
|
b91b93 |
- * be seen as success. "mount -a" tries to optimise
|
|
|
b91b93 |
- * out this case but sometimes fails. Help it out
|
|
|
b91b93 |
- * by pretending everything is rosy
|
|
|
b91b93 |
+#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
|
|
|
b91b93 |
+ if (errno == EBUSY && is_mountpoint(mi->node)) {
|
|
|
b91b93 |
+#pragma GCC diagnostic warning "-Wdiscarded-qualifiers"
|
|
|
b91b93 |
+ /*
|
|
|
b91b93 |
+ * EBUSY can happen when mounting a filesystem that
|
|
|
b91b93 |
+ * is already mounted or when the context= are
|
|
|
b91b93 |
+ * different when using the -o sharecache
|
|
|
b91b93 |
+ *
|
|
|
b91b93 |
+ * Only error out in the latter case.
|
|
|
b91b93 |
*/
|
|
|
b91b93 |
return EX_SUCCESS;
|
|
|
b91b93 |
+ }
|
|
|
b91b93 |
|
|
|
b91b93 |
if (nfs_is_permanent_error(errno))
|
|
|
b91b93 |
break;
|