From 781b16775ba0bb55fac0e1757bf0bd87c8879632 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 6 Mar 2010 18:41:07 +0000 Subject: [PATCH] Fix a dumb typo - use of & instead of && We managed to lose O_DIRECTORY testing due to a stupid typo in commit 1f36f774b2 ("Switch !O_CREAT case to use of do_last()") Reported-by: Walter Sheets Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- fs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/namei.c b/fs/namei.c index 3d9d2f965f84..48e60a187325 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1656,7 +1656,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path, if (path->dentry->d_inode->i_op->follow_link) return NULL; error = -ENOTDIR; - if (*want_dir & !path->dentry->d_inode->i_op->lookup) + if (*want_dir && !path->dentry->d_inode->i_op->lookup) goto exit_dput; path_to_nameidata(path, nd); audit_inode(pathname, nd->path.dentry); -- 2.20.1