diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/inode.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index d5aa97310943..b330e27c2d8b 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -3796,6 +3796,12 @@ struct inode *btrfs_lookup_dentry(struct inode *dir, struct dentry *dentry) | |||
3796 | 3796 | ||
3797 | if (location.type == BTRFS_INODE_ITEM_KEY) { | 3797 | if (location.type == BTRFS_INODE_ITEM_KEY) { |
3798 | inode = btrfs_iget(dir->i_sb, &location, root); | 3798 | inode = btrfs_iget(dir->i_sb, &location, root); |
3799 | if (unlikely(root->clean_orphans) && | ||
3800 | !(inode->i_sb->s_flags & MS_RDONLY)) { | ||
3801 | down_read(&root->fs_info->cleanup_work_sem); | ||
3802 | btrfs_orphan_cleanup(root); | ||
3803 | up_read(&root->fs_info->cleanup_work_sem); | ||
3804 | } | ||
3799 | return inode; | 3805 | return inode; |
3800 | } | 3806 | } |
3801 | 3807 | ||