diff options
author | Yan, Zheng <zheng.yan@oracle.com> | 2009-11-12 04:37:02 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-12-17 12:33:33 -0500 |
commit | 2e4bfab97055aa6acdd0637913bd705c2d6506d6 (patch) | |
tree | 2c07c3668c8d13ee1e2076d32a728c60eaa8f4ed /fs/btrfs/transaction.c | |
parent | c71bf099abddf3e0fdc27f251ba76fca1461d49a (diff) |
Btrfs: Avoid orphan inodes cleanup during committing transaction
btrfs_lookup_dentry may trigger orphan cleanup, so it's not good
to call it while committing a transaction.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index b7b22c344b66..728e8fe5d2cc 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -796,7 +796,6 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, | |||
796 | memcpy(&pending->root_key, &key, sizeof(key)); | 796 | memcpy(&pending->root_key, &key, sizeof(key)); |
797 | fail: | 797 | fail: |
798 | kfree(new_root_item); | 798 | kfree(new_root_item); |
799 | btrfs_unreserve_metadata_space(root, 6); | ||
800 | return ret; | 799 | return ret; |
801 | } | 800 | } |
802 | 801 | ||
@@ -808,7 +807,6 @@ static noinline int finish_pending_snapshot(struct btrfs_fs_info *fs_info, | |||
808 | u64 index = 0; | 807 | u64 index = 0; |
809 | struct btrfs_trans_handle *trans; | 808 | struct btrfs_trans_handle *trans; |
810 | struct inode *parent_inode; | 809 | struct inode *parent_inode; |
811 | struct inode *inode; | ||
812 | struct btrfs_root *parent_root; | 810 | struct btrfs_root *parent_root; |
813 | 811 | ||
814 | parent_inode = pending->dentry->d_parent->d_inode; | 812 | parent_inode = pending->dentry->d_parent->d_inode; |
@@ -840,8 +838,6 @@ static noinline int finish_pending_snapshot(struct btrfs_fs_info *fs_info, | |||
840 | 838 | ||
841 | BUG_ON(ret); | 839 | BUG_ON(ret); |
842 | 840 | ||
843 | inode = btrfs_lookup_dentry(parent_inode, pending->dentry); | ||
844 | d_instantiate(pending->dentry, inode); | ||
845 | fail: | 841 | fail: |
846 | btrfs_end_transaction(trans, fs_info->fs_root); | 842 | btrfs_end_transaction(trans, fs_info->fs_root); |
847 | return ret; | 843 | return ret; |