Commit 4ca8b41e authored by Chris Mason's avatar Chris Mason

Btrfs: Avoid calling into the FS for the final iput on fake root inodes

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 7ea394f1
...@@ -1739,6 +1739,7 @@ int close_ctree(struct btrfs_root *root) ...@@ -1739,6 +1739,7 @@ int close_ctree(struct btrfs_root *root)
free_extent_buffer(root->fs_info->dev_root->node); free_extent_buffer(root->fs_info->dev_root->node);
btrfs_free_block_groups(root->fs_info); btrfs_free_block_groups(root->fs_info);
fs_info->closing = 2;
del_fs_roots(fs_info); del_fs_roots(fs_info);
filemap_write_and_wait(fs_info->btree_inode->i_mapping); filemap_write_and_wait(fs_info->btree_inode->i_mapping);
......
...@@ -2092,6 +2092,9 @@ int btrfs_write_inode(struct inode *inode, int wait) ...@@ -2092,6 +2092,9 @@ int btrfs_write_inode(struct inode *inode, int wait)
struct btrfs_trans_handle *trans; struct btrfs_trans_handle *trans;
int ret = 0; int ret = 0;
if (root->fs_info->closing > 1)
return 0;
if (wait) { if (wait) {
trans = btrfs_join_transaction(root, 1); trans = btrfs_join_transaction(root, 1);
btrfs_set_trans_block_group(trans, inode); btrfs_set_trans_block_group(trans, inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment