SUNRPC: Fix potential races in xprt_lock_write_next()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 18 Jan 2012 03:57:37 +0000 (22:57 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 1 Feb 2012 00:28:08 +0000 (19:28 -0500)
commit961a828df64979d2a9faeeeee043391670a193b9
tree4b7ddaf1a19c589e3c8ec96b6c732faa507f2899
parent2aeb98f498ce37742b743080fdc6c8cf64053599
SUNRPC: Fix potential races in xprt_lock_write_next()

We have to ensure that the wake up from the waitqueue and the assignment
of xprt->snd_task are atomic. We can do this by assigning the snd_task
while under the waitqueue spinlock.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c
fs/nfs/nfs4state.c
include/linux/sunrpc/sched.h
net/sunrpc/sched.c
net/sunrpc/xprt.c