Skip to contentSkip to conversation

fscache: Use wrapper fscache_set_cache_state() directly when relinquishing

PATCH JeffleXu 1 participant 1 message Apr 6, 2022 1 message not in the archive

lore
Share & tools
lore

JeffleXu

author Reviewed-by
#1 lore raw
In reply to a message not in the archive
Quoted 12 lines · Yue Hu

We already have the wrapper function to set cache state.

---
 fs/fscache/cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fscache/cache.c +0 -0
index 2749933852a9..d645f8b302a2 100644

fs/fscache/cache.c void fscache_relinquish_cache(struct fscache_cache *cache) · line 220

Quoted 8 lines
fs/fscache/cache.c +1 -1
@@ -214,7 +214,7 @@ void fscache_relinquish_cache(struct fscache_cache *cache)
 
 	cache->ops = NULL;
 	cache->cache_priv = NULL;
-	smp_store_release(&cache->state, FSCACHE_CACHE_IS_NOT_PRESENT);
+	fscache_set_cache_state(cache, FSCACHE_CACHE_IS_NOT_PRESENT);
 	fscache_put_cache(cache, where);
 }
 EXPORT_SYMBOL(fscache_relinquish_cache);

Looks good to me.

Signature · 2 lines
Thanks,
Jeffle