Skip to content

Commit

Permalink
do_last: kill a rudiment of old ->d_revalidate() workaround
Browse files Browse the repository at this point in the history
There used to be time when ->d_revalidate() couldn't return an error.
So intents code had lookup_instantiate_filp() stash ERR_PTR(error)
in nd->intent.open.filp and had it checked after lookup_hash(), to
catch the otherwise silent failures.  That had been introduced by
commit 4af4c52.  These days
->d_revalidate() can and does propagate errors back to callers
explicitly, so this check isn't needed anymore.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Mar 14, 2011
1 parent 6c0d46c commit f374ed5
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2183,11 +2183,6 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
path->dentry = dentry;
path->mnt = nd->path.mnt;

if (IS_ERR(nd->intent.open.file)) {
error = PTR_ERR(nd->intent.open.file);
goto exit_mutex_unlock;
}

/* Negative dentry, just create the file */
if (!dentry->d_inode) {
int mode = op->mode;
Expand Down

0 comments on commit f374ed5

Please sign in to comment.