projects
/
sdk
/
emulator
/
emulator-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
582aa64
)
path_init(): make -ENOTDIR failure exits consistent
author
Al Viro
<viro@zeniv.linux.org.uk>
Thu, 20 Dec 2012 18:41:28 +0000
(13:41 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Thu, 20 Dec 2012 18:57:35 +0000
(13:57 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c
patch
|
blob
|
history
diff --git
a/fs/namei.c
b/fs/namei.c
index e245d88b4d696f1172571a7456aaa4e688555e2b..35195ff9d194340b9e2e48c90c5854a14ec4d7a4 100644
(file)
--- a/
fs/namei.c
+++ b/
fs/namei.c
@@
-1859,7
+1859,7
@@
static int path_init(int dfd, const char *name, unsigned int flags,
if (flags & LOOKUP_ROOT) {
struct inode *inode = nd->root.dentry->d_inode;
if (*name) {
- if (!
inode->i_op->lookup
)
+ if (!
can_lookup(inode)
)
return -ENOTDIR;
retval = inode_permission(inode, MAY_EXEC);
if (retval)
@@
-1913,7
+1913,7
@@
static int path_init(int dfd, const char *name, unsigned int flags,
dentry = f.file->f_path.dentry;
if (*name) {
- if (!
S_ISDIR(dentry->d_inode->i_m
ode)) {
+ if (!
can_lookup(dentry->d_in
ode)) {
fdput(f);
return -ENOTDIR;
}