Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=013a8c1ab5a214c608e12b602770449fb6b15a81
Commit:     013a8c1ab5a214c608e12b602770449fb6b15a81
Parent:     19207231c9874899e7511507ebb1b88d648a5743
Author:     Chuck Lever <[EMAIL PROTECTED]>
AuthorDate: Sun Jul 1 12:13:38 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 23:40:47 2007 -0400

    NFS: Improve debugging output in NFS in-kernel mount client
    
    Signed-off-by: Chuck Lever <[EMAIL PROTECTED]>
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 fs/nfs/mount_clnt.c |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
index 961dc52..8afd9f7 100644
--- a/fs/nfs/mount_clnt.c
+++ b/fs/nfs/mount_clnt.c
@@ -66,7 +66,7 @@ int nfs_mount(struct sockaddr *addr, size_t len, char 
*hostname, char *path,
 
        mnt_clnt = rpc_create(&args);
        if (IS_ERR(mnt_clnt))
-               return PTR_ERR(mnt_clnt);
+               goto out_clnt_err;
 
        if (version == NFS_MNT3_VERSION)
                msg.rpc_proc = &mnt_clnt->cl_procinfo[MOUNTPROC3_MNT];
@@ -75,7 +75,31 @@ int nfs_mount(struct sockaddr *addr, size_t len, char 
*hostname, char *path,
 
        status = rpc_call_sync(mnt_clnt, &msg, 0);
        rpc_shutdown_client(mnt_clnt);
-       return status < 0? status : (result.status? -EACCES : 0);
+
+       if (status < 0)
+               goto out_call_err;
+       if (result.status != 0)
+               goto out_mnt_err;
+
+       dprintk("NFS: MNT request succeeded\n");
+       status = 0;
+
+out:
+       return status;
+
+out_clnt_err:
+       status = PTR_ERR(mnt_clnt);
+       dprintk("NFS: failed to create RPC client, status=%d\n", status);
+       goto out;
+
+out_call_err:
+       dprintk("NFS: failed to start MNT request, status=%d\n", status);
+       goto out;
+
+out_mnt_err:
+       dprintk("NFS: MNT server returned result %d\n", result.status);
+       status = -EACCES;
+       goto out;
 }
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to