Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx> --- fs/nfs/mount_clnt.c | 18 +++++++++++++----- include/linux/nfs_fs.h | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index f8584ad..81ea782 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c @@ -16,7 +16,7 @@ #include <linux/nfs_fs.h> #ifdef RPC_DEBUG -# define NFSDBG_FACILITY NFSDBG_ROOT +# define NFSDBG_FACILITY NFSDBG_MOUNT #endif static struct rpc_program mnt_program; @@ -72,8 +72,8 @@ int nfs_mount(struct sockaddr_in *addr, char *path, struct nfs_fh *fh, char hostname[32]; int status; - dprintk("NFS: nfs_mount(%08x:%s)\n", - (unsigned)ntohl(addr->sin_addr.s_addr), path); + dprintk("NFS: %s: mounting" NIPQUAD_FMT ":%s\n", + __FUNCTION__, NIPQUAD(addr->sin_addr.s_addr), path); sprintf(hostname, NIPQUAD_FMT, NIPQUAD(addr->sin_addr.s_addr)); mnt_clnt = mnt_create(hostname, addr, version, protocol); @@ -86,10 +86,18 @@ int nfs_mount(struct sockaddr_in *addr, char *path, struct nfs_fh *fh, msg.rpc_proc = &mnt_clnt->cl_procinfo[MNTPROC_MNT]; status = rpc_call_sync(mnt_clnt, &msg, 0); - if (status < 0) + if (status < 0) { + dprintk("NFS: %s: rpc_call_sync returned %d\n", + __FUNCTION__, status); return status; - if (result.status != 0) + } + if (result.status != 0) { + dprintk("NFS: %s: server returned %d\n", + __FUNCTION__, result.status); return -EACCES; + } + dprintk("NFS: %s: mount request succeeded\n", + __FUNCTION__); return 0; } diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 58f5b77..2f33ef7 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -555,6 +555,7 @@ extern void * nfs_root_data(void); #define NFSDBG_ROOT 0x0080 #define NFSDBG_CALLBACK 0x0100 #define NFSDBG_CLIENT 0x0200 +#define NFSDBG_MOUNT 0x0400 #define NFSDBG_ALL 0xFFFF #ifdef __KERNEL__ - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html