aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/delegation.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-12-10 14:57:16 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-30 02:05:52 -0500
commit5d8515caeb99940f5ed56d22a03aba20bbe7fdcb (patch)
treeb17ec1fc7bf34a73f65bf8c4b9f837beb54a64f9 /fs/nfs/delegation.c
parentd4d3c507493afd3c9d19fbe9762f44e790909dbe (diff)
NFS: eliminate NIPQUAD(clp->cl_addr.sin_addr)
To ensure the NFS client displays IPv6 addresses properly, replace address family-specific NIPQUAD() invocations with a call to the RPC client to get a formatted string representing the remote peer's address. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r--fs/nfs/delegation.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 11833f4caeaa..b03dcd8403f1 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -156,8 +156,9 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct
156 if (memcmp(&delegation->stateid, &nfsi->delegation->stateid, 156 if (memcmp(&delegation->stateid, &nfsi->delegation->stateid,
157 sizeof(delegation->stateid)) != 0 || 157 sizeof(delegation->stateid)) != 0 ||
158 delegation->type != nfsi->delegation->type) { 158 delegation->type != nfsi->delegation->type) {
159 printk("%s: server %u.%u.%u.%u, handed out a duplicate delegation!\n", 159 printk(KERN_WARNING "%s: server %s handed out "
160 __FUNCTION__, NIPQUAD(clp->cl_addr.sin_addr)); 160 "a duplicate delegation!\n",
161 __FUNCTION__, clp->cl_hostname);
161 status = -EIO; 162 status = -EIO;
162 } 163 }
163 } 164 }
@@ -314,8 +315,9 @@ void nfs_expire_all_delegations(struct nfs_client *clp)
314 __module_get(THIS_MODULE); 315 __module_get(THIS_MODULE);
315 atomic_inc(&clp->cl_count); 316 atomic_inc(&clp->cl_count);
316 task = kthread_run(nfs_do_expire_all_delegations, clp, 317 task = kthread_run(nfs_do_expire_all_delegations, clp,
317 "%u.%u.%u.%u-delegreturn", 318 "%s-delegreturn",
318 NIPQUAD(clp->cl_addr.sin_addr)); 319 rpc_peeraddr2str(clp->cl_rpcclient,
320 RPC_DISPLAY_ADDR));
319 if (!IS_ERR(task)) 321 if (!IS_ERR(task))
320 return; 322 return;
321 nfs_put_client(clp); 323 nfs_put_client(clp);