aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2011-09-08 12:07:44 -0400
committerJ. Bruce Fields <bfields@redhat.com>2011-09-13 18:30:32 -0400
commitd5477a8db8134c481ad7b4b745f6defa119253e1 (patch)
treedba3b9a52068041ddaa2bcdfb88dd181fb698c6e /fs/nfsd/nfs4state.c
parentdcef0413da9a17bfca917d8b49baf309ce76b737 (diff)
nfsd4: add common dl_stid field to delegation
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index d0bb5a5613a..3e3d605d3e7 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -247,10 +247,10 @@ alloc_init_deleg(struct nfs4_client *clp, struct nfs4_ol_stateid *stp, struct sv
247 get_nfs4_file(fp); 247 get_nfs4_file(fp);
248 dp->dl_file = fp; 248 dp->dl_file = fp;
249 dp->dl_type = type; 249 dp->dl_type = type;
250 dp->dl_stateid.si_boot = boot_time; 250 dp->dl_stid.sc_stateid.si_boot = boot_time;
251 dp->dl_stateid.si_stateownerid = current_delegid++; 251 dp->dl_stid.sc_stateid.si_stateownerid = current_delegid++;
252 dp->dl_stateid.si_fileid = 0; 252 dp->dl_stid.sc_stateid.si_fileid = 0;
253 dp->dl_stateid.si_generation = 1; 253 dp->dl_stid.sc_stateid.si_generation = 1;
254 fh_copy_shallow(&dp->dl_fh, &current_fh->fh_handle); 254 fh_copy_shallow(&dp->dl_fh, &current_fh->fh_handle);
255 dp->dl_time = 0; 255 dp->dl_time = 0;
256 atomic_set(&dp->dl_count, 1); 256 atomic_set(&dp->dl_count, 1);
@@ -2572,7 +2572,7 @@ find_delegation_file(struct nfs4_file *fp, stateid_t *stid)
2572 2572
2573 spin_lock(&recall_lock); 2573 spin_lock(&recall_lock);
2574 list_for_each_entry(dp, &fp->fi_delegations, dl_perfile) 2574 list_for_each_entry(dp, &fp->fi_delegations, dl_perfile)
2575 if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid) { 2575 if (dp->dl_stid.sc_stateid.si_stateownerid == stid->si_stateownerid) {
2576 spin_unlock(&recall_lock); 2576 spin_unlock(&recall_lock);
2577 return dp; 2577 return dp;
2578 } 2578 }
@@ -2861,10 +2861,10 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_ol_
2861 if (status) 2861 if (status)
2862 goto out_free; 2862 goto out_free;
2863 2863
2864 memcpy(&open->op_delegate_stateid, &dp->dl_stateid, sizeof(dp->dl_stateid)); 2864 memcpy(&open->op_delegate_stateid, &dp->dl_stid.sc_stateid, sizeof(dp->dl_stid.sc_stateid));
2865 2865
2866 dprintk("NFSD: delegation stateid=" STATEID_FMT "\n", 2866 dprintk("NFSD: delegation stateid=" STATEID_FMT "\n",
2867 STATEID_VAL(&dp->dl_stateid)); 2867 STATEID_VAL(&dp->dl_stid.sc_stateid));
2868out: 2868out:
2869 if (open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS 2869 if (open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS
2870 && flag == NFS4_OPEN_DELEGATE_NONE 2870 && flag == NFS4_OPEN_DELEGATE_NONE
@@ -3296,7 +3296,7 @@ nfs4_preprocess_stateid_op(struct nfsd4_compound_state *cstate,
3296 dp = find_delegation_stateid(ino, stateid); 3296 dp = find_delegation_stateid(ino, stateid);
3297 if (!dp) 3297 if (!dp)
3298 goto out; 3298 goto out;
3299 status = check_stateid_generation(stateid, &dp->dl_stateid, nfsd4_has_session(cstate)); 3299 status = check_stateid_generation(stateid, &dp->dl_stid.sc_stateid, nfsd4_has_session(cstate));
3300 if (status) 3300 if (status)
3301 goto out; 3301 goto out;
3302 status = nfs4_check_delegmode(dp, flags); 3302 status = nfs4_check_delegmode(dp, flags);
@@ -3667,7 +3667,7 @@ nfsd4_delegreturn(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
3667 dp = find_delegation_stateid(inode, stateid); 3667 dp = find_delegation_stateid(inode, stateid);
3668 if (!dp) 3668 if (!dp)
3669 goto out; 3669 goto out;
3670 status = check_stateid_generation(stateid, &dp->dl_stateid, nfsd4_has_session(cstate)); 3670 status = check_stateid_generation(stateid, &dp->dl_stid.sc_stateid, nfsd4_has_session(cstate));
3671 if (status) 3671 if (status)
3672 goto out; 3672 goto out;
3673 renew_client(dp->dl_client); 3673 renew_client(dp->dl_client);
@@ -3737,7 +3737,7 @@ search_for_delegation(stateid_t *stid)
3737 list_for_each_entry(fp, &file_hashtbl[i], fi_hash) { 3737 list_for_each_entry(fp, &file_hashtbl[i], fi_hash) {
3738 list_for_each(pos, &fp->fi_delegations) { 3738 list_for_each(pos, &fp->fi_delegations) {
3739 dp = list_entry(pos, struct nfs4_delegation, dl_perfile); 3739 dp = list_entry(pos, struct nfs4_delegation, dl_perfile);
3740 if (same_stateid(&dp->dl_stateid, stid)) 3740 if (same_stateid(&dp->dl_stid.sc_stateid, stid))
3741 return dp; 3741 return dp;
3742 } 3742 }
3743 } 3743 }