summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGuanjun He <gjhe@suse.com>2012-07-08 19:50:33 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-26 11:38:38 -0800
commit59d02721bb2838893596d5617659fe907dd45518 (patch)
tree126ac6b7dba3ef26cb4c6e32b7bc2faf74c1c35d /include
parent9beb73fcb83317786226b4203d7e56c6b0f43adb (diff)
libceph: prevent the race of incoming work during teardown
(cherry picked from commit a2a3258417eb6a1799cf893350771428875a8287) 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ceph/messenger.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h
index ec22abd51fa0..de39cda6bd58 100644
--- a/include/linux/ceph/messenger.h
+++ b/include/linux/ceph/messenger.h
@@ -50,6 +50,7 @@ struct ceph_messenger {
struct ceph_entity_inst inst; /* my name+address */
struct ceph_entity_addr my_enc_addr;
+ atomic_t stopping;
bool nocrc;
/*