diff options
author | NeilBrown <neilb@cse.unsw.edu.au> | 2005-06-24 01:02:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-24 03:06:27 -0400 |
commit | 4a6e43e6d4e43723699879f421d321e39eab5e41 (patch) | |
tree | 81de781defa837bc59c51725355181a94adb2652 /fs/nfsd/nfs4state.c | |
parent | 52f4fb43063c182f3ef7e257ab336a8be8066bb0 (diff) |
[PATCH] nfsd4: nfs4_check_delegmode
Additional minor code reshuffling to prepare for claim_deleg_cur support.
Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index bb95275e7bae..31f7082df49f 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1526,6 +1526,15 @@ out: | |||
1526 | return status; | 1526 | return status; |
1527 | } | 1527 | } |
1528 | 1528 | ||
1529 | static inline int | ||
1530 | nfs4_check_delegmode(struct nfs4_delegation *dp, int flags) | ||
1531 | { | ||
1532 | if ((flags & WR_STATE) && (dp->dl_type == NFS4_OPEN_DELEGATE_READ)) | ||
1533 | return nfserr_openmode; | ||
1534 | else | ||
1535 | return nfs_ok; | ||
1536 | } | ||
1537 | |||
1529 | static struct nfs4_delegation * | 1538 | static struct nfs4_delegation * |
1530 | find_delegation_file(struct nfs4_file *fp, stateid_t *stid) | 1539 | find_delegation_file(struct nfs4_file *fp, stateid_t *stid) |
1531 | { | 1540 | { |
@@ -1961,15 +1970,6 @@ out: | |||
1961 | } | 1970 | } |
1962 | 1971 | ||
1963 | static inline int | 1972 | static inline int |
1964 | nfs4_check_delegmode(struct nfs4_delegation *dp, int flags) | ||
1965 | { | ||
1966 | if ((flags & WR_STATE) && (dp->dl_type == NFS4_OPEN_DELEGATE_READ)) | ||
1967 | return nfserr_openmode; | ||
1968 | else | ||
1969 | return nfs_ok; | ||
1970 | } | ||
1971 | |||
1972 | static inline int | ||
1973 | check_special_stateids(svc_fh *current_fh, stateid_t *stateid, int flags) | 1973 | check_special_stateids(svc_fh *current_fh, stateid_t *stateid, int flags) |
1974 | { | 1974 | { |
1975 | /* Trying to call delegreturn with a special stateid? Yuch: */ | 1975 | /* Trying to call delegreturn with a special stateid? Yuch: */ |