nfsd4: eliminate unused lt_stateowner
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 1 Sep 2011 15:31:45 +0000 (11:31 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 1 Sep 2011 15:35:30 +0000 (11:35 -0400)
This is used only as a local variable.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c
fs/nfsd/xdr4.h

index 834a5f844f42d00c373e1262e58a34e71a34608d..a47bf884726f55b09c9ae7ab6b0e10815f6d017c 100644 (file)
@@ -4098,6 +4098,7 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
 {
        struct inode *inode;
        struct file_lock file_lock;
+       struct nfs4_stateowner *so;
        int error;
        __be32 status;
 
@@ -4107,7 +4108,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
        if (check_lock_length(lockt->lt_offset, lockt->lt_length))
                 return nfserr_inval;
 
-       lockt->lt_stateowner = NULL;
        nfs4_lock_state();
 
        status = nfserr_stale_clientid;
@@ -4134,10 +4134,10 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
                goto out;
        }
 
-       lockt->lt_stateowner = find_lockstateowner_str(inode,
+       so = find_lockstateowner_str(inode,
                        &lockt->lt_clientid, &lockt->lt_owner);
-       if (lockt->lt_stateowner)
-               file_lock.fl_owner = (fl_owner_t)lockt->lt_stateowner;
+       if (so)
+               file_lock.fl_owner = (fl_owner_t)so;
        file_lock.fl_pid = current->tgid;
        file_lock.fl_flags = FL_POSIX;
 
index de236fb89e748f30e6e3b2e882989305f7415e91..27a3dfab96a95c2cd91641629605b22dbf780af1 100644 (file)
@@ -184,7 +184,6 @@ struct nfsd4_lockt {
        struct xdr_netobj               lt_owner;
        u64                             lt_offset;
        u64                             lt_length;
-       struct nfs4_stateowner *        lt_stateowner;
        struct nfsd4_lock_denied        lt_denied;
 };