Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kill LOOKUP_CONTINUE

LOOKUP_PARENT is equivalent to it now

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 49084c3b 8aeb376c

+3 -9
+3 -8
fs/namei.c
··· 664 664 /* We don't want to mount if someone supplied AT_NO_AUTOMOUNT 665 665 * and this is the terminal part of the path. 666 666 */ 667 - if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_CONTINUE)) 667 + if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_PARENT)) 668 668 return -EISDIR; /* we actually want to stop here */ 669 669 670 670 /* We want to mount if someone is trying to open/create a file of any ··· 676 676 * appended a '/' to the name. 677 677 */ 678 678 if (!(flags & LOOKUP_FOLLOW) && 679 - !(flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY | 679 + !(flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY | 680 680 LOOKUP_OPEN | LOOKUP_CREATE))) 681 681 return -EISDIR; 682 682 ··· 695 695 * the path being looked up; if it wasn't then the remainder of 696 696 * the path is inaccessible and we should say so. 697 697 */ 698 - if (PTR_ERR(mnt) == -EISDIR && (flags & LOOKUP_CONTINUE)) 698 + if (PTR_ERR(mnt) == -EISDIR && (flags & LOOKUP_PARENT)) 699 699 return -EREMOTE; 700 700 return PTR_ERR(mnt); 701 701 } ··· 1281 1281 { 1282 1282 struct path next; 1283 1283 int err; 1284 - unsigned int lookup_flags = nd->flags; 1285 1284 1286 1285 while (*name=='/') 1287 1286 name++; ··· 1293 1294 struct qstr this; 1294 1295 unsigned int c; 1295 1296 int type; 1296 - 1297 - nd->flags |= LOOKUP_CONTINUE; 1298 1297 1299 1298 err = may_lookup(nd); 1300 1299 if (err) ··· 1355 1358 /* here ends the main loop */ 1356 1359 1357 1360 last_component: 1358 - /* Clear LOOKUP_CONTINUE iff it was previously unset */ 1359 - nd->flags &= lookup_flags | ~LOOKUP_CONTINUE; 1360 1361 nd->last = this; 1361 1362 nd->last_type = type; 1362 1363 return 0;
-1
include/linux/namei.h
··· 48 48 */ 49 49 #define LOOKUP_FOLLOW 0x0001 50 50 #define LOOKUP_DIRECTORY 0x0002 51 - #define LOOKUP_CONTINUE 0x0004 52 51 53 52 #define LOOKUP_PARENT 0x0010 54 53 #define LOOKUP_REVAL 0x0020