android_kernel_google_msm/net/ceph
Alex Elder 70b06043cd libceph: just set SOCK_CLOSED when state changes
(cherry picked from commit d65c9e0b9e)

When a TCP_CLOSE or TCP_CLOSE_WAIT event occurs, the SOCK_CLOSED
connection flag bit is set, and if it had not been previously set
queue_con() is called to ensure con_work() will get a chance to
handle the changed state.

con_work() atomically checks--and if set, clears--the SOCK_CLOSED
bit if it was set.  This means that even if the bit were set
repeatedly, the related processing in con_work() only gets called
once per transition of the bit from 0 to 1.

What's important then is that we ensure con_work() gets called *at
least* once when a socket close event occurs, not that it gets
called *exactly* once.

The work queue mechanism already takes care of queueing work
only if it is not already queued, so there's no need for us
to call queue_con() conditionally.

So this patch just makes it so the SOCK_CLOSED flag gets set
unconditionally in ceph_sock_state_change().

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26 11:38:27 -08:00
..
crush crush: fix memory leak when destroying tree buckets 2012-11-26 11:38:03 -08:00
armor.c libceph: Fix base64-decoding when input ends in newline. 2011-03-15 09:14:02 -07:00
auth.c ceph: Move secret key parsing earlier. 2011-03-29 12:11:16 -07:00
auth_none.c ceph: messenger: reduce args to create_authorizer 2012-11-26 11:38:07 -08:00
auth_none.h
auth_x.c ceph: messenger: reduce args to create_authorizer 2012-11-26 11:38:07 -08:00
auth_x.h
auth_x_protocol.h
buffer.c
ceph_common.c libceph: embed ceph messenger structure in ceph_client 2012-11-26 11:38:21 -08:00
ceph_fs.c ceph: fix file mode calculation 2011-07-19 11:25:04 -07:00
ceph_hash.c
ceph_strings.c
crypto.c ceph: Use kmemdup rather than duplicating its implementation 2012-01-10 08:56:54 -08:00
crypto.h libceph: Create a new key type "ceph". 2011-03-29 12:11:24 -07:00
debugfs.c
Kconfig ceph: use kernel DNS resolver 2011-10-25 16:10:16 -07:00
Makefile
messenger.c libceph: just set SOCK_CLOSED when state changes 2012-11-26 11:38:27 -08:00
mon_client.c libceph: make ceph_con_revoke() a msg operation 2012-11-26 11:38:24 -08:00
msgpool.c libceph: don't complain on msgpool alloc failures 2011-10-25 16:10:15 -07:00
osd_client.c libceph: make ceph_con_revoke_message() a msg op 2012-11-26 11:38:24 -08:00
osdmap.c libceph: fix overflow in osdmap_apply_incremental() 2012-11-26 11:38:24 -08:00
pagelist.c
pagevec.c