diff options
-rw-r--r-- | fs/nfsd/nfs4state.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 909a7a493688..d5555850cb64 100644 --- 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) | |||
2048 | return nfs_ok; | 2048 | return nfs_ok; |
2049 | } | 2049 | } |
2050 | 2050 | ||
2051 | static int is_delegation_stateid(stateid_t *stateid) | ||
2052 | { | ||
2053 | return stateid->si_fileid == 0; | ||
2054 | } | ||
2055 | |||
2051 | /* | 2056 | /* |
2052 | * Checks for stateid operations | 2057 | * Checks for stateid operations |
2053 | */ | 2058 | */ |
@@ -2073,7 +2078,7 @@ nfs4_preprocess_stateid_op(struct svc_fh *current_fh, stateid_t *stateid, int fl | |||
2073 | goto out; | 2078 | goto out; |
2074 | 2079 | ||
2075 | status = nfserr_bad_stateid; | 2080 | status = nfserr_bad_stateid; |
2076 | if (!stateid->si_fileid) { /* delegation stateid */ | 2081 | if (is_delegation_stateid(stateid)) { |
2077 | dp = find_delegation_stateid(ino, stateid); | 2082 | dp = find_delegation_stateid(ino, stateid); |
2078 | if (!dp) | 2083 | if (!dp) |
2079 | goto out; | 2084 | goto out; |