2022-02-19 19:03:47

by Steve Dickson

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Steve Dickson <[email protected]>
---
utils/mount/stropts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index 573df6e..dbdd11e 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -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;
--
2.35.1


2022-02-24 01:14:30

by Steve Dickson

[permalink] [raw]
Subject: Re: [PATCH] mount.nfs: Fix Typo auto negotiating code.



On 2/19/22 11:46 AM, Steve Dickson wrote:
> 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.
>
> Signed-off-by: Steve Dickson <[email protected]>
Committed... (tag: nfs-utils-2-6-2-rc2)

steved.
> ---
> utils/mount/stropts.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
> index 573df6e..dbdd11e 100644
> --- a/utils/mount/stropts.c
> +++ b/utils/mount/stropts.c
> @@ -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;