Whamcloud - gitweb
LU-11827 llog: protect cathandle in llog_cat_declare_add_rec 14/33914/4
authorVladimir Saveliev <c17830@cray.com>
Sat, 22 Dec 2018 00:31:45 +0000 (03:31 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 27 Feb 2019 02:01:57 +0000 (02:01 +0000)
commit59a62ada2e18174e5611730e8bcf5ba3165ca2b9
tree0bcae7403b91bd46fdc143b947da690ce581633c
parent8b364fbd6bd9e0088440e6d6837861a641b923a0
LU-11827 llog: protect cathandle in llog_cat_declare_add_rec

llog_cat_declare_add_rec() calls llog_cat_prep_log() passing
&cathandle->u.chd.chd_current_log and
&cathandle->u.chd.chd_next_log. Then it has to protect cathandle in
order to avoid race with llog_cat_current_log() when it decides to
change cathandle->u.chd.chd_current_log and
cathandle->u.chd.chd_next_log.

Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Cray-bug-id: LUS-6804
Change-Id: I689efb40452af180f137aff35ccabe132a24180a
Reviewed-on: https://review.whamcloud.com/33914
Tested-by: Jenkins
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/llog_cat.c