]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/xfs/xfs_mount.c
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / fs / xfs / xfs_mount.c
index b341f10cf4810bf3716aec354f33fbdbf9ab5494..9b9540db17a6132472dc35c9ec2edaa5ace0b30d 100644 (file)
@@ -157,6 +157,7 @@ xfs_free_perag(
                spin_unlock(&mp->m_perag_lock);
                ASSERT(pag);
                ASSERT(atomic_read(&pag->pag_ref) == 0);
+               xfs_buf_hash_destroy(pag);
                call_rcu(&pag->rcu_head, __xfs_free_perag);
        }
 }
@@ -212,8 +213,8 @@ xfs_initialize_perag(
                spin_lock_init(&pag->pag_ici_lock);
                mutex_init(&pag->pag_ici_reclaim_lock);
                INIT_RADIX_TREE(&pag->pag_ici_root, GFP_ATOMIC);
-               spin_lock_init(&pag->pag_buf_lock);
-               pag->pag_buf_tree = RB_ROOT;
+               if (xfs_buf_hash_init(pag))
+                       goto out_unwind;
 
                if (radix_tree_preload(GFP_NOFS))
                        goto out_unwind;
@@ -239,9 +240,11 @@ xfs_initialize_perag(
        return 0;
 
 out_unwind:
+       xfs_buf_hash_destroy(pag);
        kmem_free(pag);
        for (; index > first_initialised; index--) {
                pag = radix_tree_delete(&mp->m_perag_tree, index);
+               xfs_buf_hash_destroy(pag);
                kmem_free(pag);
        }
        return error;