]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSv4.1/pnfs: Fix atomicity of commit list updates
authorTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 31 Jul 2015 20:24:30 +0000 (16:24 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 17:33:28 +0000 (19:33 +0200)
commit85be9353c68e79d108f462ddb5c4447fc21a3aa7
treecc7d438241ad3ba136e50a0875236fed4219eff4
parent1e837cb760e8c0749055d459fbd1471a8e19a83e
NFSv4.1/pnfs: Fix atomicity of commit list updates

commit 86d80f973434de24d8a807a92cd59d5ced7bd519 upstream.

pnfs_layout_mark_request_commit() needs to ensure that it adds the
request to the commit list atomically with all the other updates
in order to prevent corruption to buckets[ds_commit_idx].wlseg
due to races with pnfs_generic_clear_request_commit().

Fixes: 338d00cfef07d ("pnfs: Refactor the *_layout_mark_request_commit...")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/internal.h
fs/nfs/pnfs_nfs.c
fs/nfs/write.c