]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
super: fix for destroy lrus
authorGlauber Costa <glommer@gmail.com>
Thu, 27 Jun 2013 23:52:23 +0000 (09:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:38:04 +0000 (16:38 +1000)
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>
fs/super.c
fs/xfs/xfs_buf.c
fs/xfs/xfs_qm.c

index b79e732555cbb77b4f915ef631aa37ea728359a6..09da975a2c8939b40c67a3be1d8e921aed7956f3 100644 (file)
@@ -328,6 +328,9 @@ void deactivate_locked_super(struct super_block *s)
 
                /* caches are now gone, we can safely kill the shrinker now */
                unregister_shrinker(&s->s_shrink);
+               list_lru_destroy(&s->s_dentry_lru);
+               list_lru_destroy(&s->s_inode_lru);
+
                put_filesystem(fs);
                put_super(s);
        } else {
index 6c77431808857dc31f522346da41e2808994cbe0..8b2c5aab59e08776c4d17d05d0f0f9e6ce7ba850 100644 (file)
@@ -1591,8 +1591,8 @@ xfs_free_buftarg(
        struct xfs_mount        *mp,
        struct xfs_buftarg      *btp)
 {
-       list_lru_destroy(&btp->bt_lru);
        unregister_shrinker(&btp->bt_shrinker);
+       list_lru_destroy(&btp->bt_lru);
 
        if (mp->m_flags & XFS_MOUNT_BARRIER)
                xfs_blkdev_issue_flush(btp);
index c88cb68e80e172034510b55f6a04bddc794addfe..1e3d4edca5b6b79af9935686a884e0257c1dd9b4 100644 (file)
@@ -889,8 +889,8 @@ xfs_qm_destroy_quotainfo(
        qi = mp->m_quotainfo;
        ASSERT(qi != NULL);
 
-       list_lru_destroy(&qi->qi_lru);
        unregister_shrinker(&qi->qi_shrinker);
+       list_lru_destroy(&qi->qi_lru);
 
        if (qi->qi_uquotaip) {
                IRELE(qi->qi_uquotaip);