summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorGlauber Costa <glommer@gmail.com>2013-07-03 10:20:01 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-07-09 15:24:50 +1000
commit56b2d2c461bba8fd5faa50df75262adfcf9ef1de (patch)
tree5b92108f95adb16a1664b8b7880bc1d88d1eb9ff /fs
parentde1e4a1a513803532d0ef097b410b2c5eb736a6a (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>
Diffstat (limited to 'fs')
-rw-r--r--fs/super.c3
-rw-r--r--fs/xfs/xfs_buf.c2
-rw-r--r--fs/xfs/xfs_qm.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/fs/super.c b/fs/super.c
index b79e732555cb..09da975a2c89 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -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 {
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 6c7743180885..8b2c5aab59e0 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -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);
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index 17920a41622f..46743cf94d8f 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -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);