mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
[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:
parent
36bdfc8bae
commit
c45c357d7d
2 changed files with 12 additions and 19 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue