Whamcloud - gitweb
LU-15013 osc: use original cli for osc_lru_reclaim for debug msg 66/44966/5
authorJames Simmons <jsimmons@infradead.org>
Fri, 17 Sep 2021 14:30:22 +0000 (10:30 -0400)
committerOleg Drokin <green@whamcloud.com>
Sun, 10 Oct 2021 03:31:44 +0000 (03:31 +0000)
commit3c6a1e94c652685fac7c69bf530e05d27b7f477c
tree4559756cc620e91083dd69ceba509f6f57fd3f57
parent882a9f784de27bb6043345316ed3f5f4835a9bbf
LU-15013 osc: use original cli for osc_lru_reclaim for debug msg

Before the list cleanup introduced in osc_lru_reclaim() the
variable cli was both passed in and used to scan the
cl_client_cache. After the scan was done then we use cli in
a debug message. It appears to be the original intent was to
use the original cli passed in for the debug message, not the
last scanned item. After the list cleanup patch landed now
cli can be NULL which can crash the node. The fix is to use
a separate struct client_obd variable for the scan and use
the original cli passed in for the debug message.

Test-Parameters: trivial
Fixes: 8c166f6bf42c ("LU-6142 lustre: use list_first_entry() in lustre subdirectory.")
Change-Id: I5f0f1b986744fdd30af7f7856c1278b41447a373
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/44966
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osc/osc_page.c