projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc0bad7
)
cifs: fix regression with O_EXCL creates and optimize away lookup
author
Jeff Layton
<
[email protected]
>
Sun, 5 Jul 2009 15:01:02 +0000
(11:01 -0400)
committer
Steve French
<
[email protected]
>
Wed, 8 Jul 2009 21:55:45 +0000
(21:55 +0000)
cifs: fix regression with O_EXCL creates and optimize away lookup
Signed-off-by: Jeff Layton <
[email protected]
>
Tested-by: Shirish Pargaonkar <
[email protected]
>
CC: Stable Kernel <
[email protected]
>
Signed-off-by: Steve French <
[email protected]
>
fs/cifs/dir.c
patch
|
blob
|
history
diff --git
a/fs/cifs/dir.c
b/fs/cifs/dir.c
index a40054faed7f68d27f9a3cfbbed09ddf6e0b72b7..ff55fc6932cb805a25d58608a8cd8241e127d60c 100644
(file)
--- a/
fs/cifs/dir.c
+++ b/
fs/cifs/dir.c
@@
-643,6
+643,15
@@
cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
}
}
+ /*
+ * O_EXCL: optimize away the lookup, but don't hash the dentry. Let
+ * the VFS handle the create.
+ */
+ if (nd->flags & LOOKUP_EXCL) {
+ d_instantiate(direntry, NULL);
+ return 0;
+ }
+
/* can not grab the rename sem here since it would
deadlock in the cases (beginning of sys_rename itself)
in which we already have the sb rename sem */