Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3088
b: refs/heads/master
c: 52f4fb4
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Jun 24, 2005
1 parent c8f706b commit 79fd616
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c0a400d1debb172c596b24ab82efab4975990a9
refs/heads/master: 52f4fb43063c182f3ef7e257ab336a8be8066bb0
25 changes: 14 additions & 11 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1526,6 +1526,18 @@ nfsd4_process_open1(struct nfsd4_open *open)
return status;
}

static struct nfs4_delegation *
find_delegation_file(struct nfs4_file *fp, stateid_t *stid)
{
struct nfs4_delegation *dp;

list_for_each_entry(dp, &fp->fi_del_perfile, dl_del_perfile) {
if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid)
return dp;
}
return NULL;
}

static int
nfs4_check_open(struct nfs4_file *fp, struct nfsd4_open *open, struct nfs4_stateid **stpp)
{
Expand Down Expand Up @@ -2419,24 +2431,15 @@ find_stateid(stateid_t *stid, int flags)
static struct nfs4_delegation *
find_delegation_stateid(struct inode *ino, stateid_t *stid)
{
struct nfs4_delegation *dp = NULL;
struct nfs4_file *fp = NULL;
u32 st_id;

dprintk("NFSD:find_delegation_stateid stateid=(%08x/%08x/%08x/%08x)\n",
stid->si_boot, stid->si_stateownerid,
stid->si_fileid, stid->si_generation);

st_id = stid->si_stateownerid;
fp = find_file(ino);
if (fp) {
list_for_each_entry(dp, &fp->fi_del_perfile, dl_del_perfile) {
if(dp->dl_stateid.si_stateownerid == st_id) {
dprintk("NFSD: find_delegation dp %p\n",dp);
return dp;
}
}
}
if (fp)
return find_delegation_file(fp, stid);
return NULL;
}

Expand Down

0 comments on commit 79fd616

Please sign in to comment.