From 01ebf84b26ba4b73f1d8a89f30603651e1c0044f Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Sat, 21 Feb 2009 13:17:19 -0800 Subject: [PATCH] --- yaml --- r: 142155 b: refs/heads/master c: 3e633079e377d2b527a8390f63ceb887b5cabfbf h: refs/heads/master i: 142153: 0f6c91bed7b32d7a61e523b108d33368d2f1501b 142151: 06ac5a7d39f4811e11514be7d42abaddc21805fa v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4state.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 6a2703ed49cd..c4e5d86dd200 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 819a8f539acf7838d62fec20e88401ff53303cd1 +refs/heads/master: 3e633079e377d2b527a8390f63ceb887b5cabfbf diff --git a/trunk/fs/nfsd/nfs4state.c b/trunk/fs/nfsd/nfs4state.c index 909a7a493688..d5555850cb64 100644 --- a/trunk/fs/nfsd/nfs4state.c +++ b/trunk/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;