Whamcloud - gitweb
LU-11827 llog: protect cathandle in llog_cat_declare_add_rec 55/34455/3
authorVladimir Saveliev <c17830@cray.com>
Sat, 22 Dec 2018 00:31:45 +0000 (03:31 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 1 Apr 2019 06:20:14 +0000 (06:20 +0000)
commit834d54138b250ddedc06f478e9cdfdbf0c352bda
tree3e5ac356d2284403773019b27920b9c90933517c
parent54f4c4341b8330468ad95abd2bf4051a3d17abba
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.

Lustre-change: https://review.whamcloud.com/33914
Lustre-commit: 59a62ada2e18174e5611730e8bcf5ba3165ca2b9

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