summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-defrag.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-11-06 16:26:24 +0100
committerChris Mason <chris.mason@oracle.com>2008-09-25 17:03:57 +0200
commit081e95736d9118a96e9f6dcc5cec02dc75c9e1cb (patch)
tree41c1b692a0ba44223cadae5d78bc3446f963dca1 /fs/btrfs/tree-defrag.c
parentBtrfs: Properly update free space cache in __free_extent (diff)
downloadlinux-081e95736d9118a96e9f6dcc5cec02dc75c9e1cb.tar.xz
linux-081e95736d9118a96e9f6dcc5cec02dc75c9e1cb.zip
Btrfs: Make defrag check nodes against the progress key to prevent repeating work
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/tree-defrag.c')
-rw-r--r--fs/btrfs/tree-defrag.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/tree-defrag.c b/fs/btrfs/tree-defrag.c
index 65ef12351566..6ef1ba5f9c2f 100644
--- a/fs/btrfs/tree-defrag.c
+++ b/fs/btrfs/tree-defrag.c
@@ -227,7 +227,8 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
break;
if (wret < 0)
ret = wret;
- ret = -EAGAIN;
+ else
+ ret = -EAGAIN;
break;
}
for (i = 0; i <= orig_level; i++) {