diff options
author | Glauber Costa <glommer@gmail.com> | 2013-08-27 20:18:18 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-09-10 18:56:32 -0400 |
commit | f5e1dd34561e0fb06400b378d595198918833021 (patch) | |
tree | 2cdaf7568df3ab762f42e7849fc9211dcb60d1bc | |
parent | 5ca302c8e502ca53b7d75f12127ec0289904003a (diff) |
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>
-rw-r--r-- | fs/super.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_buf.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_qm.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/fs/super.c b/fs/super.c index 269d96857caa..3a96c9783a8b 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -323,6 +323,9 @@ void deactivate_locked_super(struct super_block *s) | |||
323 | 323 | ||
324 | /* caches are now gone, we can safely kill the shrinker now */ | 324 | /* caches are now gone, we can safely kill the shrinker now */ |
325 | unregister_shrinker(&s->s_shrink); | 325 | unregister_shrinker(&s->s_shrink); |
326 | list_lru_destroy(&s->s_dentry_lru); | ||
327 | list_lru_destroy(&s->s_inode_lru); | ||
328 | |||
326 | put_filesystem(fs); | 329 | put_filesystem(fs); |
327 | put_super(s); | 330 | put_super(s); |
328 | } else { | 331 | } else { |
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 49fdb7bed481..263470075ea2 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c | |||
@@ -1592,8 +1592,8 @@ xfs_free_buftarg( | |||
1592 | struct xfs_mount *mp, | 1592 | struct xfs_mount *mp, |
1593 | struct xfs_buftarg *btp) | 1593 | struct xfs_buftarg *btp) |
1594 | { | 1594 | { |
1595 | list_lru_destroy(&btp->bt_lru); | ||
1596 | unregister_shrinker(&btp->bt_shrinker); | 1595 | unregister_shrinker(&btp->bt_shrinker); |
1596 | list_lru_destroy(&btp->bt_lru); | ||
1597 | 1597 | ||
1598 | if (mp->m_flags & XFS_MOUNT_BARRIER) | 1598 | if (mp->m_flags & XFS_MOUNT_BARRIER) |
1599 | xfs_blkdev_issue_flush(btp); | 1599 | xfs_blkdev_issue_flush(btp); |
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c index 7f4138629a80..3e6c2e6c9cd2 100644 --- a/fs/xfs/xfs_qm.c +++ b/fs/xfs/xfs_qm.c | |||
@@ -940,8 +940,8 @@ xfs_qm_destroy_quotainfo( | |||
940 | qi = mp->m_quotainfo; | 940 | qi = mp->m_quotainfo; |
941 | ASSERT(qi != NULL); | 941 | ASSERT(qi != NULL); |
942 | 942 | ||
943 | list_lru_destroy(&qi->qi_lru); | ||
944 | unregister_shrinker(&qi->qi_shrinker); | 943 | unregister_shrinker(&qi->qi_shrinker); |
944 | list_lru_destroy(&qi->qi_lru); | ||
945 | 945 | ||
946 | if (qi->qi_uquotaip) { | 946 | if (qi->qi_uquotaip) { |
947 | IRELE(qi->qi_uquotaip); | 947 | IRELE(qi->qi_uquotaip); |