Loading fs/namei.c +15 −2 Original line number Original line Diff line number Diff line Loading @@ -2254,9 +2254,22 @@ static struct file *do_last(struct nameidata *nd, struct path *path, if (error < 0) if (error < 0) goto exit; goto exit; error = lookup_slow(nd, &nd->last, path); BUG_ON(nd->inode != dir->d_inode); if (error < 0) mutex_lock(&dir->d_inode->i_mutex); dentry = __lookup_hash(&nd->last, dir, nd); mutex_unlock(&dir->d_inode->i_mutex); error = PTR_ERR(dentry); if (IS_ERR(dentry)) goto exit; goto exit; path->mnt = nd->path.mnt; path->dentry = dentry; error = follow_managed(path, nd->flags); if (unlikely(error < 0)) goto exit_dput; if (error) nd->flags |= LOOKUP_JUMPED; inode = path->dentry->d_inode; inode = path->dentry->d_inode; } } Loading Loading
fs/namei.c +15 −2 Original line number Original line Diff line number Diff line Loading @@ -2254,9 +2254,22 @@ static struct file *do_last(struct nameidata *nd, struct path *path, if (error < 0) if (error < 0) goto exit; goto exit; error = lookup_slow(nd, &nd->last, path); BUG_ON(nd->inode != dir->d_inode); if (error < 0) mutex_lock(&dir->d_inode->i_mutex); dentry = __lookup_hash(&nd->last, dir, nd); mutex_unlock(&dir->d_inode->i_mutex); error = PTR_ERR(dentry); if (IS_ERR(dentry)) goto exit; goto exit; path->mnt = nd->path.mnt; path->dentry = dentry; error = follow_managed(path, nd->flags); if (unlikely(error < 0)) goto exit_dput; if (error) nd->flags |= LOOKUP_JUMPED; inode = path->dentry->d_inode; inode = path->dentry->d_inode; } } Loading