aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2010-01-26 09:30:53 -0500
committerChris Mason <chris.mason@oracle.com>2010-01-28 16:20:39 -0500
commite3acc2a6850efff647f1c5458524eb3a8bcba20a (patch)
treea111740f879f5f0cbbcaf079c2500535263c1278 /fs/btrfs/inode.c
parentf858153c367a397235d3e81136741e40e44faf1d (diff)
Btrfs: run orphan cleanup on default fs root
This patch revert's commit 6c090a11e1c403b727a6a8eff0b97d5fb9e95cb5 Since it introduces this problem where we can run orphan cleanup on a volume that can have orphan entries re-added. Instead of my original fix, Yan Zheng pointed out that we can just revert my original fix and then run the orphan cleanup in open_ctree after we look up the fs_root. I have tested this with all the tests that gave me problems and this patch fixes both problems. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 5606361b5f04..8cd109972fa6 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3797,12 +3797,6 @@ struct inode *btrfs_lookup_dentry(struct inode *dir, struct dentry *dentry)
3797 3797
3798 if (location.type == BTRFS_INODE_ITEM_KEY) { 3798 if (location.type == BTRFS_INODE_ITEM_KEY) {
3799 inode = btrfs_iget(dir->i_sb, &location, root); 3799 inode = btrfs_iget(dir->i_sb, &location, root);
3800 if (unlikely(root->clean_orphans) &&
3801 !(inode->i_sb->s_flags & MS_RDONLY)) {
3802 down_read(&root->fs_info->cleanup_work_sem);
3803 btrfs_orphan_cleanup(root);
3804 up_read(&root->fs_info->cleanup_work_sem);
3805 }
3806 return inode; 3800 return inode;
3807 } 3801 }
3808 3802