Whamcloud - gitweb
DDN-4623 obdclass: fix upcall_cache_get_entry
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 19 Jan 2024 17:09:14 +0000 (18:09 +0100)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 23 Jan 2024 02:03:33 +0000 (02:03 +0000)
commit0b8a3723b84ce0e34985f88a22fbd905d3c8ae2d
tree97a6493b1d0979a370717b945054117d78576854
parent80ac209373d168bef5440e73cfa12dbe5a9a0605
DDN-4623 obdclass: fix upcall_cache_get_entry

When an entry is found while holding the read lock, we need to
convert to a write lock and find again, to check that entry was
not modified/freed in between.
In this case, the variable indicating an entry was found must be
reset, because we might not find any valid entry after all.

Fixes: 127128bed3 ("LU-16498 obdclass: change uc_lock to rwlock")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I111af4562ac78eeb22102a8a28943e46e30b4019
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53743
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/obdclass/upcall_cache.c