aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorYan Zheng <zheng.yan@oracle.com>2009-07-28 08:41:57 -0400
committerChris Mason <chris.mason@oracle.com>2009-07-28 08:41:57 -0400
commitf25784b35f590c81d5fb8245a8cd45e1afb6f1b2 (patch)
tree71306747041b6e4a5eaccc5028c770fed29b3f87 /fs/btrfs/extent-tree.c
parent68b38550ddbea13d296184bf69edff387618b1d3 (diff)
Btrfs: Fix async caching interaction with unmount
- don't stop the caching thread until btrfs_commit_super return. - if caching is interrupted by umount, set last to (u64)-1. otherwise the un-scanned range of block group will be considered as free extent. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 08188f1615d9..fadf69a2764b 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -288,8 +288,10 @@ again:
288 288
289 while (1) { 289 while (1) {
290 smp_mb(); 290 smp_mb();
291 if (block_group->fs_info->closing) 291 if (block_group->fs_info->closing > 1) {
292 last = (u64)-1;
292 break; 293 break;
294 }
293 295
294 leaf = path->nodes[0]; 296 leaf = path->nodes[0];
295 slot = path->slots[0]; 297 slot = path->slots[0];