RE: Re: [PATCH] use S_ISDIR() in link_path_walk() to decide whether the last path component is a directory

2004-09-13 Thread David Dabbs
> viro wrote: >> if (*name == '/') { >>if (*(name+1)=='/' && *(name+2)==':') { >> name+=3; > > Pathname resolution is a hell of a fundamental thing and kludges >like that are too ugly to be acceptable. If you can't make that clean >and have to resort to stuffing "speci

Re: [PATCH] use S_ISDIR() in link_path_walk() to decide whether the last path component is a directory

2004-09-13 Thread viro
On Mon, Sep 13, 2004 at 04:34:15PM -0500, David Dabbs wrote: > I'm working on something similar, but with alternate pathname resolution > when the path begins with exactly two slashes. Only pseudocode here because > I do not have access to my box: > > if (*name == '/') { >if (*(name+1)

Re: [PATCH] use S_ISDIR() in link_path_walk() to decide whether the last path component is a directory

2004-09-13 Thread David Dabbs
>viro wrote >On Mon, Sep 13, 2004 at 11:49:22AM +0400, Alex Zarochentsev wrote: > Hi, > > This patch does not allow open(name, O_DIRECTORY) to be successful for > non-directories in reiser4. It replaces ->i_op->lookup != NULL "is dir" > check for the last path component by explicit S_ISDIR(->i_m

Re: [PATCH] use S_ISDIR() in link_path_walk() to decide whether the last path component is a directory

2004-09-13 Thread viro
On Mon, Sep 13, 2004 at 11:49:22AM +0400, Alex Zarochentsev wrote: > Hi, > > This patch does not allow open(name, O_DIRECTORY) to be successful for > non-directories in reiser4. It replaces ->i_op->lookup != NULL "is dir" check > for the last path component by explicit S_ISDIR(->i_mode) check. >