]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/xfs/linux-2.6/xfs_buf.c
[PATCH] Direct Migration V9: Avoid writeback / page_migrate() method
[karo-tx-linux.git] / fs / xfs / linux-2.6 / xfs_buf.c
index e44b7c1a3a36d432617edfd66131c30a259359f9..bfb4f2917bb69b01c472dc31f7d2eb36d9e1cb28 100644 (file)
@@ -822,6 +822,13 @@ xfs_buf_rele(
 
        XB_TRACE(bp, "rele", bp->b_relse);
 
+       if (unlikely(!hash)) {
+               ASSERT(!bp->b_relse);
+               if (atomic_dec_and_test(&bp->b_hold))
+                       xfs_buf_free(bp);
+               return;
+       }
+
        if (atomic_dec_and_lock(&bp->b_hold, &hash->bh_lock)) {
                if (bp->b_relse) {
                        atomic_inc(&bp->b_hold);
@@ -1514,6 +1521,7 @@ xfs_mapping_buftarg(
        struct address_space    *mapping;
        static struct address_space_operations mapping_aops = {
                .sync_page = block_sync_page,
+               .migratepage = fail_migrate_page,
        };
 
        inode = new_inode(bdev->bd_inode->i_sb);