]> git.baikalelectronics.ru Git - kernel.git/commit
nfs: add memory barriers around NFS_INO_INVALID_DATA and NFS_INO_INVALIDATING
authorJeff Layton <jlayton@redhat.com>
Tue, 28 Jan 2014 18:47:46 +0000 (13:47 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 28 Jan 2014 19:48:18 +0000 (14:48 -0500)
commit36127648ddfeeb92252c66b2defccabd530f23fd
tree7ccf6324c0643b0b35c1ccc0895292f51000685e
parent2a6628d414e8ab2a2ea26f84eba8b36f01f092f2
nfs: add memory barriers around NFS_INO_INVALID_DATA and NFS_INO_INVALIDATING

If the setting of NFS_INO_INVALIDATING gets reordered to before the
clearing of NFS_INO_INVALID_DATA, then another task may hit a race
window where both appear to be clear, even though the inode's pages are
still in need of invalidation. Fix this by adding the appropriate memory
barriers.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/dir.c
fs/nfs/inode.c
fs/nfs/write.c