projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af2f554
)
vfs: do_last(): only return EISDIR for O_CREAT
author
Miklos Szeredi
<mszeredi@suse.cz>
Mon, 21 May 2012 15:30:12 +0000
(17:30 +0200)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 1 Jun 2012 16:11:59 +0000
(12:11 -0400)
This allows this code to be shared between O_CREAT and plain opens.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/namei.c
b/fs/namei.c
index 4767c0588b6ed5436ec3d2b9288ddb7a377aa5d8..90210b46b4614bd03bc27252905f065a55cf0e6f 100644
(file)
--- a/
fs/namei.c
+++ b/
fs/namei.c
@@
-2384,7
+2384,7
@@
static struct file *do_last(struct nameidata *nd, struct path *path,
if (error)
return ERR_PTR(error);
error = -EISDIR;
- if (S_ISDIR(nd->inode->i_mode))
+ if (
(open_flag & O_CREAT) &&
S_ISDIR(nd->inode->i_mode))
goto exit;
error = -ENOTDIR;
if ((nd->flags & LOOKUP_DIRECTORY) && !nd->inode->i_op->lookup)