Fix btrfs_del_ordered_inode to allow forcing the drop during unlinks
This allows us to delete an unlinked inode with dirty pages from the list
instead of forcing commit to write these out before deleting the inode.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index b2251e2..cf27b59 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -852,7 +852,7 @@
* we don't need to worry about
* data=ordered
*/
- btrfs_del_ordered_inode(inode);
+ btrfs_del_ordered_inode(inode, 1);
}
btrfs_end_transaction(trans, root);
@@ -1276,14 +1276,12 @@
btrfs_end_transaction(trans, root);
btrfs_btree_balance_dirty(root, nr);
- btrfs_throttle(root);
return;
no_delete_lock:
nr = trans->blocks_used;
btrfs_end_transaction(trans, root);
btrfs_btree_balance_dirty(root, nr);
- btrfs_throttle(root);
no_delete:
clear_inode(inode);
}