diff --git a/fs/namei.c b/fs/namei.c index e2ba62820a0f35ee0531a4ad6ac0dc6725ad0b58..f79aef16320b2a092d45297b399199a093766179 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2261,7 +2261,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path, /* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */ error = complete_walk(nd); if (error) - goto exit; + return ERR_PTR(error); error = -EISDIR; if (S_ISDIR(nd->inode->i_mode)) goto exit;