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. 
> 
> Regardless to reiser4, S_ISDIR() looks more clear there.

The only objection here is that right now we are guaranteed that cwd and
root of every task have non-NULL ->lookup().  With your patch all we have
is S_ISDIR().

So we either need to check for non-NULL ->lookup() before the beginning of
loop in link_path_walk() or split the flag in two.  I would rather do the
former...

Reply via email to