Hi Steve,
This patch is against:
git://git.linux-nfs.org/projects/steved/nfs-utils.git
In mountd, if get_exportlist() (utils/mountd/mountd.c) returns NULL it
should not be considered a failure. It just means that there are no
exports on the system.
The practical problem with the current code is that a showmount -e
results in a syslog message from mountd that looks like:
rpc.mountd: export request from 10.250.100.2 failed.
References: SGI: PV977213
Reviewed-by: Greg Banks <[email protected]>
Signed-off-by: Harshula Jayasuriya <[email protected]>
---
utils/mountd/mountd.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -254,10 +254,8 @@ mount_export_1_svc(struct svc_req *rqstp, void
*argp, exports *resp)
struct sockaddr_in *addr =
(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
- if ((*resp = get_exportlist()) == NULL)
- xlog(L_WARNING, "export request from %s failed.",
- inet_ntoa(addr->sin_addr));
-
+ xlog(D_CALL, "EXPORT1 request from %s.",
inet_ntoa(addr->sin_addr));
+ *resp = get_exportlist();
return 1;
}
@@ -267,9 +265,8 @@ mount_exportall_1_svc(struct svc_req *rqstp, void
*argp, exports *resp)
struct sockaddr_in *addr =
(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
- if ((*resp = get_exportlist()) == NULL)
- xlog(L_WARNING, "exportall request from %s failed.",
- inet_ntoa(addr->sin_addr));
+ xlog(D_CALL, "EXPORTALL1 request from %s.",
inet_ntoa(addr->sin_addr));
+ *resp = get_exportlist();
return 1;
}
cya,
#
Harshula wrote:
> In mountd, if get_exportlist() (utils/mountd/mountd.c) returns NULL it
> should not be considered a failure. It just means that there are no
> exports on the system.
>
> The practical problem with the current code is that a showmount -e
> results in a syslog message from mountd that looks like:
>
> rpc.mountd: export request from 10.250.100.2 failed.
Committed... thanks!
steved.