aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph/messenger.h
diff options
context:
space:
mode:
authorGuanjun He <gjhe@suse.com>2012-07-08 22:50:33 -0400
committerSage Weil <sage@inktank.com>2012-07-30 12:29:53 -0400
commita2a3258417eb6a1799cf893350771428875a8287 (patch)
treef8906aa980d79af72e7e02d5592512a914c4b721 /include/linux/ceph/messenger.h
parenta16cb1f70799c851410d9dca0a24122e258df06c (diff)
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>
Diffstat (limited to 'include/linux/ceph/messenger.h')
-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 cfb1bbdac624..a310d7fe6e29 100644
--- a/include/linux/ceph/messenger.h
+++ b/include/linux/ceph/messenger.h
@@ -50,6 +50,7 @@ struct ceph_messenger {
50 struct ceph_entity_inst inst; /* my name+address */ 50 struct ceph_entity_inst inst; /* my name+address */
51 struct ceph_entity_addr my_enc_addr; 51 struct ceph_entity_addr my_enc_addr;
52 52
53 atomic_t stopping;
53 bool nocrc; 54 bool nocrc;
54 55
55 /* 56 /*