summaryrefslogtreecommitdiff
path: root/fs/befs/inode.h
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-06-21 02:53:53 (GMT)
committerSage Weil <sage@inktank.com>2012-07-06 04:14:22 (GMT)
commitd65c9e0b9eb43d14ece9dd843506ccba06162ee7 (patch)
tree9705e30834dbd2bad64ca69b815467161c2838f8 /fs/befs/inode.h
parent188048bce311ee41e5178bc3255415d0eae28423 (diff)
downloadlinux-fsl-qoriq-d65c9e0b9eb43d14ece9dd843506ccba06162ee7.tar.xz
libceph: just set SOCK_CLOSED when state changes
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>
Diffstat (limited to 'fs/befs/inode.h')
0 files changed, 0 insertions, 0 deletions