Skip to contentSkip to conversation

mount.nfs: Fix Typo auto negotiating code.

PATCH In review Steve Dickson 1 participant 2 messages Feb 19, 2022 – Feb 23, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mount.nfs: Fix Typo auto negotiating code.

Commit 14258541 add a check that had a '||' instead of a '&&' which is the typo.

The intention of commit 14258541 was to show EBUSY errors but this error is not shown when the mount point does exists (commit afda50fc).

In the end, EBUSY are now interrupted correctly in this corner case.

---
 utils/mount/stropts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/mount/stropts.c +1 -1
index 573df6e..dbdd11e 100644
@@ -973,7 +973,7 @@ fall_back:
 	if ((result = nfs_try_mount_v3v2(mi, FALSE)))
 		return result;
 
-	if (errno != EBUSY || errno != EACCES)
+	if (errno != EBUSY && errno != EACCES)
 		errno = olderrno;
 
 	return result;
Signature · 1 line
2.35.1
#1 lore raw
Quoted 11 lines · Steve Dickson

Commit 14258541 add a check that had a '||' instead of a '&&' which is the typo.

The intention of commit 14258541 was to show EBUSY errors but this error is not shown when the mount point does exists (commit afda50fc).

In the end, EBUSY are now interrupted correctly in this corner case.

Committed... (tag: nfs-utils-2-6-2-rc2)

steved.

Quoted 17 lines
---
  utils/mount/stropts.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
utils/mount/stropts.c +1 -1
index 573df6e..dbdd11e 100644
@@ -973,7 +973,7 @@ fall_back:
  	if ((result = nfs_try_mount_v3v2(mi, FALSE)))
  		return result;
 
-	if (errno != EBUSY || errno != EACCES)
+	if (errno != EBUSY && errno != EACCES)
  		errno = olderrno;
 
  	return result;