Skip to contentSkip to conversation

fs/namei.c lookup_flags is misleading

DISCUSSION Keith Owens 1 participant 1 message Jun 20, 2001

lore
Share & tools
lore
#0 lore raw

2.4.6-pre3 and earlier. fs/namei.c:lookup_flags() checks for O_CREATE, it even has a comment saying that O_CREATE|O_EXCL is a special case. But the only place lookup_flags() is called has

if (!(flag & O_CREAT)) {
if (path_init(pathname, lookup_flags(flag), nd))

so O_CREATE can never be set. Not a bug, just misleading. It does not help that path_walk() has a variable called lookup_flags.