mount.nfs Fix error reporting for already mounted shares (bz 2054300)

Signed-off-by: Steve Dickson <steved@redhat.com>
Resolves: bz2054300
This commit is contained in:
Steve Dickson 2022-07-22 11:54:11 -04:00
parent c973e406cb
commit 1d262326db
2 changed files with 34 additions and 0 deletions

View File

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

View File

@ -30,6 +30,7 @@ Patch006: nfs-utils-2.5.4-rpcctl.patch
Patch007: nfs-utils-2.5.4-nfsman-maxconnect.patch
Patch008: nfs-utils-2.5.4-rpcpipefs-warn.patch
Patch009: nfs-utils-2.5.4-rpcidmapd-return.patch
Patch010: nfs-utils-2.5.4-mount-ebusy.patch
Patch100: nfs-utils-1.2.1-statdpath-man.patch
Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch
@ -463,6 +464,7 @@ fi
%changelog
* Fri Jul 22 2022 Steve Dickson <steved@redhat.com> 2.5.4-12
- idmapd: Fix error status when nfs-idmapd exits (bz 2001764)
- mount.nfs Fix error reporting for already mounted shares (bz 2054300)
* Sat Jul 16 2022 Steve Dickson <steved@redhat.com> 2.5.4-11
- nfs.man: adding new mount option max_connect (bz 2106848)