projects
/
platform
/
kernel
/
kernel-mfld-blackbay.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
819a8f5
)
nfsd4: add a helper function to decide if stateid is delegation
author
J. Bruce Fields
<bfields@citi.umich.edu>
Sat, 21 Feb 2009 21:17:19 +0000
(13:17 -0800)
committer
J. Bruce Fields
<bfields@citi.umich.edu>
Wed, 18 Mar 2009 21:30:52 +0000
(17:30 -0400)
Make this check self-documenting.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/nfs4state.c
patch
|
blob
|
history
diff --git
a/fs/nfsd/nfs4state.c
b/fs/nfsd/nfs4state.c
index
909a7a4
..
d555585
100644
(file)
--- a/
fs/nfsd/nfs4state.c
+++ b/
fs/nfsd/nfs4state.c
@@
-2048,6
+2048,11
@@
static int check_stateid_generation(stateid_t *in, stateid_t *ref)
return nfs_ok;
}
+static int is_delegation_stateid(stateid_t *stateid)
+{
+ return stateid->si_fileid == 0;
+}
+
/*
* Checks for stateid operations
*/
@@
-2073,7
+2078,7
@@
nfs4_preprocess_stateid_op(struct svc_fh *current_fh, stateid_t *stateid, int fl
goto out;
status = nfserr_bad_stateid;
- if (
!stateid->si_fileid) { /* delegation stateid */
+ if (
is_delegation_stateid(stateid)) {
dp = find_delegation_stateid(ino, stateid);
if (!dp)
goto out;