]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: prevent the race of incoming work during teardown
authorGuanjun He <gjhe@suse.com>
Mon, 9 Jul 2012 02:50:33 +0000 (19:50 -0700)
committerSage Weil <sage@inktank.com>
Mon, 30 Jul 2012 16:29:53 +0000 (09:29 -0700)
commit4c56d446cf7dbcf984870d523b6de72beb6abf36
treef8906aa980d79af72e7e02d5592512a914c4b721
parentf3119db2affc4aaa7b6c2840478b18b68eba8e23
libceph: prevent the race of incoming work during teardown

Add an atomic variable 'stopping' as flag in struct ceph_messenger,
set this flag to 1 in function ceph_destroy_client(), and add the condition code
in function ceph_data_ready() to test the flag value, if true(1), just return.

Signed-off-by: Guanjun He <gjhe@suse.com>
Reviewed-by: Sage Weil <sage@inktank.com>
include/linux/ceph/messenger.h
net/ceph/ceph_common.c
net/ceph/messenger.c