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

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