[Devel] [PATCH RHEL9 COMMIT] fs/fuse kio: skip truncating dropped cslists

Konstantin Khorenko khorenko at virtuozzo.com
Fri Dec 15 20:59:26 MSK 2023


The commit is pushed to "branch-rh9-5.14.0-362.8.1.vz9.35.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-362.8.1.vz9.35.2
------>
commit a9f0b04bb37be26ffb012f12afc00cba03d3d454
Author: Yuriy Vasilev <yuriy.vasilev at virtuozzo.com>
Date:   Wed Nov 29 11:12:56 2023 +0100

    fs/fuse kio: skip truncating dropped cslists
    
    If try_cslist_get returns false, it indicates that the cslist has already
    been dropped and the map has been truncated. So, this cslist should not
    be handled.
    
    https://pmc.acronis.work/browse/VSTOR-76384
    
    Signed-off-by: Yuriy Vasilev <yuriy.vasilev at virtuozzo.com>
    Acked-by: Alexey Kuznetsov <kuznet at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_map.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c
index 424d36d26986..fc707c9dcb65 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -294,7 +294,8 @@ void pcs_cs_truncate_maps(struct pcs_cs *cs)
 		list_move(&cs_link->link, &map_list);
 
 		cs_list = cs_link_to_cs_list(cs_link);
-		cslist_get(cs_list);
+		if (!try_cslist_get(cs_list))
+			continue;
 		spin_unlock(&cs->lock);
 
 		rcu_read_lock();


More information about the Devel mailing list