Blame SOURCES/nfs-utils-2.5.4-mount-ebusy.patch

ee8f10
commit c547ad481dca5bc0b0a2e365ebcff3439848f664
ee8f10
Author: Rohan Sable <rsable@redhat.com>
ee8f10
Date:   Mon Feb 14 11:15:22 2022 -0500
ee8f10
ee8f10
    mount.nfs Fix error reporting for already mounted shares
ee8f10
    
ee8f10
    When mount is triggered for an already mounted
ee8f10
    share (using auto negotiation), it displays
ee8f10
    "mount.nfs: Protocol not supported" or
ee8f10
    "mount.nfs: access denied by server while mounting"
ee8f10
    instead of EBUSY. This easily causes confusion if
ee8f10
    the mount was not tried verbose :
ee8f10
    
ee8f10
    Signed-off-by: Rohan Sable <rsable@redhat.com>
ee8f10
    Signed-off-by: Yongcheng Yang <yoyang@redhat.com>
ee8f10
    Signed-off-by: Steve Dickson <steved@redhat.com>
ee8f10
ee8f10
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
ee8f10
index 3c4e218a..573df6ee 100644
ee8f10
--- a/utils/mount/stropts.c
ee8f10
+++ b/utils/mount/stropts.c
ee8f10
@@ -973,7 +973,9 @@ fall_back:
ee8f10
 	if ((result = nfs_try_mount_v3v2(mi, FALSE)))
ee8f10
 		return result;
ee8f10
 
ee8f10
-	errno = olderrno;
ee8f10
+	if (errno != EBUSY && errno != EACCES)
ee8f10
+		errno = olderrno;
ee8f10
+
ee8f10
 	return result;
ee8f10
 }
ee8f10