aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-08-05 13:30:48 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:06 -0400
commit4ca8b41e3fe76cc5774fbcc6cba64259d69e0f96 (patch)
treef3f0b47dc8a72657105eff6f6b005b8d2d3699cc /fs
parent7ea394f1192bee1af67ea4762c88ef4b7b0487a8 (diff)
Btrfs: Avoid calling into the FS for the final iput on fake root inodes
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/disk-io.c1
-rw-r--r--fs/btrfs/inode.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 76543683f3b9..56c54a41dbbb 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1739,6 +1739,7 @@ int close_ctree(struct btrfs_root *root)
1739 free_extent_buffer(root->fs_info->dev_root->node); 1739 free_extent_buffer(root->fs_info->dev_root->node);
1740 1740
1741 btrfs_free_block_groups(root->fs_info); 1741 btrfs_free_block_groups(root->fs_info);
1742 fs_info->closing = 2;
1742 del_fs_roots(fs_info); 1743 del_fs_roots(fs_info);
1743 1744
1744 filemap_write_and_wait(fs_info->btree_inode->i_mapping); 1745 filemap_write_and_wait(fs_info->btree_inode->i_mapping);
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index c33053ba3816..a26d365111e5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2092,6 +2092,9 @@ int btrfs_write_inode(struct inode *inode, int wait)
2092 struct btrfs_trans_handle *trans; 2092 struct btrfs_trans_handle *trans;
2093 int ret = 0; 2093 int ret = 0;
2094 2094
2095 if (root->fs_info->closing > 1)
2096 return 0;
2097
2095 if (wait) { 2098 if (wait) {
2096 trans = btrfs_join_transaction(root, 1); 2099 trans = btrfs_join_transaction(root, 1);
2097 btrfs_set_trans_block_group(trans, inode); 2100 btrfs_set_trans_block_group(trans, inode);