]> err.no Git - linux-2.6/commit
[PATCH] knfsd: test and set SK_BUSY atomically
authorGreg Banks <gnb@melbourne.sgi.com>
Mon, 2 Oct 2006 09:17:57 +0000 (02:17 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 2 Oct 2006 14:57:19 +0000 (07:57 -0700)
commitc081a0c7cfe42adf8e8b9c2b8d0b2ec7f47603e8
treeb8be50680c576427f29195946332bacd56eb1055
parent5685f0fa1c24b138d041ef129ed419c5effa40e1
[PATCH] knfsd: test and set SK_BUSY atomically

The SK_BUSY bit in svc_sock->sk_flags ensures that we do not attempt to
enqueue a socket twice.  Currently, setting and clearing the bit is protected
by svc_serv->sv_lock.  As I intend to reduce the data that the lock protects
so it's not held when svc_sock_enqueue() tests and sets SK_BUSY, that test and
set needs to be atomic.

Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
net/sunrpc/svcsock.c