Commit 4a6e43e6 authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

[PATCH] nfsd4: nfs4_check_delegmode

Additional minor code reshuffling to prepare for claim_deleg_cur support.
Signed-off-by: default avatarAndy Adamson <andros@citi.umich.edu>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 52f4fb43
...@@ -1526,6 +1526,15 @@ out: ...@@ -1526,6 +1526,15 @@ out:
return status; return status;
} }
static inline int
nfs4_check_delegmode(struct nfs4_delegation *dp, int flags)
{
if ((flags & WR_STATE) && (dp->dl_type == NFS4_OPEN_DELEGATE_READ))
return nfserr_openmode;
else
return nfs_ok;
}
static struct nfs4_delegation * static struct nfs4_delegation *
find_delegation_file(struct nfs4_file *fp, stateid_t *stid) find_delegation_file(struct nfs4_file *fp, stateid_t *stid)
{ {
...@@ -1960,15 +1969,6 @@ out: ...@@ -1960,15 +1969,6 @@ out:
return status; return status;
} }
static inline int
nfs4_check_delegmode(struct nfs4_delegation *dp, int flags)
{
if ((flags & WR_STATE) && (dp->dl_type == NFS4_OPEN_DELEGATE_READ))
return nfserr_openmode;
else
return nfs_ok;
}
static inline int static inline int
check_special_stateids(svc_fh *current_fh, stateid_t *stateid, int flags) check_special_stateids(svc_fh *current_fh, stateid_t *stateid, int flags)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment