
hulk inclusion category: cleanup bugzilla: https://gitee.com/openeuler/kernel/issues/IB5UKT -------------------------------- In the previous patch, we introduced mutex_lock to prevent concurrency between cachefiles_free_volume() and cachefiles_withdraw_volume(). Now in fscache_clear_volume_priv(), there is no need to increase fscache_volume->n_accesses to prevent concurrency. Remove the related code. Signed-off-by: Zizhi Wo <wozizhi@huawei.com> --- fs/fscache/volume.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/fs/fscache/volume.c b/fs/fscache/volume.c index 4b371d8fafed..2f8e7bd8ab1c 100644 --- a/fs/fscache/volume.c +++ b/fs/fscache/volume.c @@ -400,14 +400,8 @@ static void fscache_unhash_volume(struct fscache_volume *volume) */ static void fscache_clear_volume_priv(struct fscache_volume *volume) { - if (volume->cache_priv) { - __fscache_begin_volume_access(volume, NULL, - fscache_access_relinquish_volume); - if (volume->cache_priv) - volume->cache->ops->free_volume(volume); - fscache_end_volume_access(volume, NULL, - fscache_access_relinquish_volume_end); - } + if (volume->cache_priv) + volume->cache->ops->free_volume(volume); } /* -- 2.46.1