]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
lockd: change nlmclnt_grant() to take a "struct sockaddr *"
authorChuck Lever <chuck.lever@oracle.com>
Fri, 3 Oct 2008 16:50:36 +0000 (12:50 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Fri, 3 Oct 2008 21:02:35 +0000 (17:02 -0400)
Adjust the signature and callers of nlmclnt_grant() to pass a "struct
sockaddr *" instead of a "struct sockaddr_in *" in order to support IPv6
addresses.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/lockd/clntlock.c
fs/lockd/svc4proc.c
fs/lockd/svcproc.c
include/linux/lockd/lockd.h

index 9eaf306d15faffcadb0c4a0a325a45a85d75790c..2976bf0f414700b5bde52ea049122dc52bf5abad 100644 (file)
@@ -141,7 +141,7 @@ int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout)
 /*
  * The server lockd has called us back to tell us the lock was granted
  */
-__be32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *lock)
+__be32 nlmclnt_grant(const struct sockaddr *addr, const struct nlm_lock *lock)
 {
        const struct file_lock *fl = &lock->fl;
        const struct nfs_fh *fh = &lock->fh;
@@ -165,8 +165,7 @@ __be32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *lock
                 */
                if (fl_blocked->fl_u.nfs_fl.owner->pid != lock->svid)
                        continue;
-               if (!nlm_cmp_addr(nlm_addr(block->b_host),
-                                       (struct sockaddr *)addr))
+               if (!nlm_cmp_addr(nlm_addr(block->b_host), addr))
                        continue;
                if (nfs_compare_fh(NFS_FH(fl_blocked->fl_file->f_path.dentry->d_inode) ,fh) != 0)
                        continue;
index f6f18fa5cf8baf0720fccb6c1c589cc69dfd7d1b..50ee8eb139ab9deee8fcb60185f9f957417c4d6c 100644 (file)
@@ -220,7 +220,7 @@ nlm4svc_proc_granted(struct svc_rqst *rqstp, struct nlm_args *argp,
        resp->cookie = argp->cookie;
 
        dprintk("lockd: GRANTED       called\n");
-       resp->status = nlmclnt_grant(svc_addr_in(rqstp), &argp->lock);
+       resp->status = nlmclnt_grant(svc_addr(rqstp), &argp->lock);
        dprintk("lockd: GRANTED       status %d\n", ntohl(resp->status));
        return rpc_success;
 }
index a587b81338b12069b9b4bc27781eb2566b99d7d4..935ce967a6a1407e62024fcba62912950eb16373 100644 (file)
@@ -250,7 +250,7 @@ nlmsvc_proc_granted(struct svc_rqst *rqstp, struct nlm_args *argp,
        resp->cookie = argp->cookie;
 
        dprintk("lockd: GRANTED       called\n");
-       resp->status = nlmclnt_grant(svc_addr_in(rqstp), &argp->lock);
+       resp->status = nlmclnt_grant(svc_addr(rqstp), &argp->lock);
        dprintk("lockd: GRANTED       status %d\n", ntohl(resp->status));
        return rpc_success;
 }
index 16ff2e88f05d1181234179ce4dd94a5da98d5e71..e6b070979287fda5e44fc27621a5d875fbf97352 100644 (file)
@@ -207,7 +207,8 @@ int           nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *);
 struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl);
 void             nlmclnt_finish_block(struct nlm_wait *block);
 int              nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout);
-__be32           nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *);
+__be32           nlmclnt_grant(const struct sockaddr *addr,
+                               const struct nlm_lock *lock);
 void             nlmclnt_recovery(struct nlm_host *);
 int              nlmclnt_reclaim(struct nlm_host *, struct file_lock *);
 void             nlmclnt_next_cookie(struct nlm_cookie *);