btrfs delete ordered inode handling fix
[linux-2.6-block.git] / fs / btrfs / inode.c
index 40b4a8ec17fef7a56a1fa7b33f5373332125e8c4..1569fb864515757529ab520cc4cecf36a7acf8ac 100644 (file)
@@ -857,15 +857,11 @@ static int btrfs_unlink(struct inode *dir, struct dentry *dentry)
        nr = trans->blocks_used;
 
        if (inode->i_nlink == 0) {
-               int found;
                /* if the inode isn't linked anywhere,
                 * we don't need to worry about
                 * data=ordered
                 */
-               found = btrfs_del_ordered_inode(inode);
-               if (found == 1) {
-                       atomic_dec(&inode->i_count);
-               }
+               btrfs_del_ordered_inode(inode);
        }
 
        btrfs_end_transaction(trans, root);
@@ -1271,24 +1267,6 @@ fail:
        return err;
 }
 
-void btrfs_put_inode(struct inode *inode)
-{
-       int ret;
-
-       if (!BTRFS_I(inode)->ordered_trans) {
-               return;
-       }
-
-       if (mapping_tagged(inode->i_mapping, PAGECACHE_TAG_DIRTY) ||
-           mapping_tagged(inode->i_mapping, PAGECACHE_TAG_WRITEBACK))
-               return;
-
-       ret = btrfs_del_ordered_inode(inode);
-       if (ret == 1) {
-               atomic_dec(&inode->i_count);
-       }
-}
-
 void btrfs_delete_inode(struct inode *inode)
 {
        struct btrfs_trans_handle *trans;