summaryrefslogtreecommitdiff
path: root/fs/nfsd/filecache.h
diff options
context:
space:
mode:
authorTrond Myklebust <trondmy@gmail.com>2020-01-06 21:40:30 +0300
committerJ. Bruce Fields <bfields@redhat.com>2020-01-23 00:25:40 +0300
commit5011af4c698a95b4dc4e374b1ce3acd122a9170f (patch)
tree963befb8ca298ac85242f9916fc808de07c33420 /fs/nfsd/filecache.h
parent16f8f894108270fd99667f06bae6ebcdd0f4e4bf (diff)
downloadlinux-5011af4c698a95b4dc4e374b1ce3acd122a9170f.tar.xz
nfsd: Fix stable writes
Strictly speaking, a stable write error needs to reflect the write + the commit of that write (and only that write). To ensure that we don't pick up the write errors from other writebacks, add a rw_semaphore to provide exclusion. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/filecache.h')
-rw-r--r--fs/nfsd/filecache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/filecache.h b/fs/nfsd/filecache.h
index 79a7d6808d97..986c325a54bd 100644
--- a/fs/nfsd/filecache.h
+++ b/fs/nfsd/filecache.h
@@ -46,6 +46,7 @@ struct nfsd_file {
atomic_t nf_ref;
unsigned char nf_may;
struct nfsd_file_mark *nf_mark;
+ struct rw_semaphore nf_rwsem;
};
int nfsd_file_cache_init(void);