summaryrefslogtreecommitdiff
path: root/fs/select.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@poochiereds.net>2015-09-17 11:58:24 (GMT)
committerJ. Bruce Fields <bfields@redhat.com>2015-10-23 19:57:32 (GMT)
commitcc8a55320b5f1196bee5bd14e4bb2ebd3b983317 (patch)
treed5b6e13f764cc2c0a37d8676662302e09e1ec020 /fs/select.c
parent4eaea13425078272895ec37814c6878d78b8db9f (diff)
downloadlinux-cc8a55320b5f1196bee5bd14e4bb2ebd3b983317.tar.xz
nfsd: serialize layout stateid morphing operations
In order to allow the client to make a sane determination of what happened with racing LAYOUTGET/LAYOUTRETURN/CB_LAYOUTRECALL calls, we must ensure that the seqids return accurately represent the order of operations. The simplest way to do that is to ensure that operations on a single stateid are serialized. This patch adds a mutex to the layout stateid, and locks it when checking the layout stateid's seqid. The mutex is held over the entire operation and released after the seqid is bumped. Note that in the case of CB_LAYOUTRECALL we must move the increment of the seqid and setting into a new cb "prepare" operation. The lease infrastructure will call the lm_break callback with a spinlock held, so and we can't take the mutex in that codepath. Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/select.c')
0 files changed, 0 insertions, 0 deletions