[PATCH] knfsd: convert sk_inuse to atomic_t
Convert the svc_sock->sk_inuse counter from an int protected by svc_serv->sv_lock, to an atomic. This reduces the number of places we need to take the (effectively global) svc_serv->sv_lock. 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>
This commit is contained in:
committed by
Linus Torvalds
parent
36bdfc8bae
commit
c45c357d7d
@@ -21,7 +21,7 @@ struct svc_sock {
|
||||
struct sock * sk_sk; /* INET layer */
|
||||
|
||||
struct svc_serv * sk_server; /* service for this socket */
|
||||
unsigned int sk_inuse; /* use count */
|
||||
atomic_t sk_inuse; /* use count */
|
||||
unsigned long sk_flags;
|
||||
#define SK_BUSY 0 /* enqueued/receiving */
|
||||
#define SK_CONN 1 /* conn pending */
|
||||
|
Reference in New Issue
Block a user