···664664 /* We don't want to mount if someone supplied AT_NO_AUTOMOUNT665665 * and this is the terminal part of the path.666666 */667667- if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_CONTINUE))667667+ if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_PARENT))668668 return -EISDIR; /* we actually want to stop here */669669670670 /* We want to mount if someone is trying to open/create a file of any···676676 * appended a '/' to the name.677677 */678678 if (!(flags & LOOKUP_FOLLOW) &&679679- !(flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY |679679+ !(flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY |680680 LOOKUP_OPEN | LOOKUP_CREATE)))681681 return -EISDIR;682682···695695 * the path being looked up; if it wasn't then the remainder of696696 * the path is inaccessible and we should say so.697697 */698698- if (PTR_ERR(mnt) == -EISDIR && (flags & LOOKUP_CONTINUE))698698+ if (PTR_ERR(mnt) == -EISDIR && (flags & LOOKUP_PARENT))699699 return -EREMOTE;700700 return PTR_ERR(mnt);701701 }···12811281{12821282 struct path next;12831283 int err;12841284- unsigned int lookup_flags = nd->flags;1285128412861285 while (*name=='/')12871286 name++;···12931294 struct qstr this;12941295 unsigned int c;12951296 int type;12961296-12971297- nd->flags |= LOOKUP_CONTINUE;1298129712991298 err = may_lookup(nd);13001299 if (err)···13551358 /* here ends the main loop */1356135913571360last_component:13581358- /* Clear LOOKUP_CONTINUE iff it was previously unset */13591359- nd->flags &= lookup_flags | ~LOOKUP_CONTINUE;13601361 nd->last = this;13611362 nd->last_type = type;13621363 return 0;