|
@@ -4137,7 +4137,7 @@ struct inode *btrfs_lookup_dentry(struct inode *dir, struct dentry *dentry)
|
|
}
|
|
}
|
|
srcu_read_unlock(&root->fs_info->subvol_srcu, index);
|
|
srcu_read_unlock(&root->fs_info->subvol_srcu, index);
|
|
|
|
|
|
- if (root != sub_root) {
|
|
|
|
|
|
+ if (!IS_ERR(inode) && root != sub_root) {
|
|
down_read(&root->fs_info->cleanup_work_sem);
|
|
down_read(&root->fs_info->cleanup_work_sem);
|
|
if (!(inode->i_sb->s_flags & MS_RDONLY))
|
|
if (!(inode->i_sb->s_flags & MS_RDONLY))
|
|
btrfs_orphan_cleanup(sub_root);
|
|
btrfs_orphan_cleanup(sub_root);
|