[Devel] [PATCH VZ9 4/4] fs/fuse kio: skip truncating dropped cslists

Yuriy Vasilev yuriy.vasilev at virtuozzo.com
Wed Nov 29 13:12:56 MSK 2023


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>
---
 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();
-- 
2.34.1



More information about the Devel mailing list