Commit b49c0e63 authored by Zizhi Wo's avatar Zizhi Wo
Browse files

fscache: clean up for fscache_clear_volume_priv

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: default avatarZizhi Wo <wozizhi@huawei.com>
parent eb7f20a8
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -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);
	}
}

/*