summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-09-29 18:38:44 -0400
committerChris Mason <chris.mason@oracle.com>2009-09-29 19:50:07 -0400
commitdd7e0b7b02ccff73b87032e20fc5b4f2c1cfcc14 (patch)
tree2168da63d84f05106b2aa8eb8f5cdc8859f1e176 /fs/btrfs
parent1ab86aedbc7845a946b4ba4edf37762629970708 (diff)
downloadblackbird-op-linux-dd7e0b7b02ccff73b87032e20fc5b4f2c1cfcc14.tar.gz
blackbird-op-linux-dd7e0b7b02ccff73b87032e20fc5b4f2c1cfcc14.zip
Btrfs: fix deadlock with free space handling and user transactions
If an ioctl-initiated transaction is open, we can't force a commit during the free space checks in order to free up pinned extents or else we deadlock. Just ENOSPC instead. A more satisfying solution that reserves space for the entire user transaction up front is forthcoming... Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/extent-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index a4b2b03cd682..d119c0388af1 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3168,7 +3168,7 @@ alloc:
spin_unlock(&data_sinfo->lock);
/* commit the current transaction and try again */
- if (!committed) {
+ if (!committed && !root->fs_info->open_ioctl_trans) {
committed = 1;
trans = btrfs_join_transaction(root, 1);
if (!trans)
OpenPOWER on IntegriCloud