diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-23 14:43:40 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-23 14:43:40 -0800 |
commit | 10b9dd56860e93f11cd352e8c75a33357b80b70b (patch) | |
tree | c19fa487f183ca6b035be66cf9a4f512129e29f3 /fs/nfs/nfs4_fs.h | |
parent | 4d92c8d036a7f1c9671eb672e7623925f5274737 (diff) | |
parent | d55b352b01bc78fbc3d1bb650140668b87e58bf9 (diff) | |
download | linux-10b9dd56860e93f11cd352e8c75a33357b80b70b.tar.gz linux-10b9dd56860e93f11cd352e8c75a33357b80b70b.tar.xz |
Merge tag 'nfs-for-4.9-4' of git://git.linux-nfs.org/projects/anna/linux-nfs
Pull NFS client bugfixes from Anna Schumaker:
"Most of these fix regressions or races, but there is one patch for
stable that Arnd sent me
Stable bugfix:
- Hide array-bounds warning
Bugfixes:
- Keep a reference on lock states while checking
- Handle NFS4ERR_OLD_STATEID in nfs4_reclaim_open_state
- Don't call close if the open stateid has already been cleared
- Fix CLOSE rases with OPEN
- Fix a regression in DELEGRETURN"
* tag 'nfs-for-4.9-4' of git://git.linux-nfs.org/projects/anna/linux-nfs:
NFSv4.x: hide array-bounds warning
NFSv4.1: Keep a reference on lock states while checking
NFSv4.1: Handle NFS4ERR_OLD_STATEID in nfs4_reclaim_open_state
NFSv4: Don't call close if the open stateid has already been cleared
NFSv4: Fix CLOSE races with OPEN
NFSv4.1: Fix a regression in DELEGRETURN
Diffstat (limited to 'fs/nfs/nfs4_fs.h')
-rw-r--r-- | fs/nfs/nfs4_fs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 9b3a82abab07..1452177c822d 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h @@ -542,6 +542,13 @@ static inline bool nfs4_valid_open_stateid(const struct nfs4_state *state) return test_bit(NFS_STATE_RECOVERY_FAILED, &state->flags) == 0; } +static inline bool nfs4_state_match_open_stateid_other(const struct nfs4_state *state, + const nfs4_stateid *stateid) +{ + return test_bit(NFS_OPEN_STATE, &state->flags) && + nfs4_stateid_match_other(&state->open_stateid, stateid); +} + #else #define nfs4_close_state(a, b) do { } while (0) |