File 0001-mount.nfs-hide-EBUSY-errors.patch of Package nfs-utils.3165
From 5cc32ace518babce82c0d94c732aaf395d7f7f69 Mon Sep 17 00:00:00 2001
From: NeilBrown <firstname.lastname@example.org>
Date: Wed, 21 Oct 2015 14:07:52 +1100
Subject: [PATCH] mount.nfs - hide EBUSY errors.
Linux only returns EBUSY for a non-remount mount if the exact
requested filesystem is already mounted. Arguably this is not an
"mount -a" tries to see if each request filesystem is already mounted.
Sometimes it get it wrong - e.g. hostname aliases can confuse it.
So "mount -a" will report a failure "already mounted", which is
wrong because it should filter those out.
An each fix it just to be silent about EBUSY. As the requested
result (a given filesystem being mounted at a given location) is in
effect after the EBUSY return, we can just treat it as success.
Signed-off-by: NeilBrown <email@example.com>
utils/mount/stropts.c | 9 +++++++++
1 file changed, 9 insertions(+)
@@ -906,6 +906,15 @@ static int nfsmount_fg(struct nfsmount_i
+ if (errno == EBUSY)
+ /* The only cause of EBUSY is if exactly the desired
+ * filesystem is already mounted. That can arguably
+ * be seen as success. "mount -a" tries to optimise
+ * out this case but sometimes fails. Help it out
+ * by pretending everything is rosy
+ return EX_SUCCESS;