mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
super: fix for destroy lrus
This patch adds the missing call to list_lru_destroy (spotted by Li Zhong) and moves the deletion to after the shrinker is unregistered, as correctly spotted by Dave Signed-off-by: Glauber Costa <glommer@openvz.org> Cc: Michal Hocko <mhocko@suse.cz> Cc: Dave Chinner <dchinner@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
5ca302c8e5
commit
f5e1dd3456
@ -323,6 +323,9 @@ void deactivate_locked_super(struct super_block *s)
|
|||||||
|
|
||||||
/* caches are now gone, we can safely kill the shrinker now */
|
/* caches are now gone, we can safely kill the shrinker now */
|
||||||
unregister_shrinker(&s->s_shrink);
|
unregister_shrinker(&s->s_shrink);
|
||||||
|
list_lru_destroy(&s->s_dentry_lru);
|
||||||
|
list_lru_destroy(&s->s_inode_lru);
|
||||||
|
|
||||||
put_filesystem(fs);
|
put_filesystem(fs);
|
||||||
put_super(s);
|
put_super(s);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1592,8 +1592,8 @@ xfs_free_buftarg(
|
|||||||
struct xfs_mount *mp,
|
struct xfs_mount *mp,
|
||||||
struct xfs_buftarg *btp)
|
struct xfs_buftarg *btp)
|
||||||
{
|
{
|
||||||
list_lru_destroy(&btp->bt_lru);
|
|
||||||
unregister_shrinker(&btp->bt_shrinker);
|
unregister_shrinker(&btp->bt_shrinker);
|
||||||
|
list_lru_destroy(&btp->bt_lru);
|
||||||
|
|
||||||
if (mp->m_flags & XFS_MOUNT_BARRIER)
|
if (mp->m_flags & XFS_MOUNT_BARRIER)
|
||||||
xfs_blkdev_issue_flush(btp);
|
xfs_blkdev_issue_flush(btp);
|
||||||
|
@ -940,8 +940,8 @@ xfs_qm_destroy_quotainfo(
|
|||||||
qi = mp->m_quotainfo;
|
qi = mp->m_quotainfo;
|
||||||
ASSERT(qi != NULL);
|
ASSERT(qi != NULL);
|
||||||
|
|
||||||
list_lru_destroy(&qi->qi_lru);
|
|
||||||
unregister_shrinker(&qi->qi_shrinker);
|
unregister_shrinker(&qi->qi_shrinker);
|
||||||
|
list_lru_destroy(&qi->qi_lru);
|
||||||
|
|
||||||
if (qi->qi_uquotaip) {
|
if (qi->qi_uquotaip) {
|
||||||
IRELE(qi->qi_uquotaip);
|
IRELE(qi->qi_uquotaip);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user