提交 5ddf1e0f 编写于 作者: J Jeff Layton 提交者: Steve French

cifs: fix regression with O_EXCL creates and optimize away lookup

cifs: fix regression with O_EXCL creates and optimize away lookup
Signed-off-by: NJeff Layton <jlayton@redhat.com>
Tested-by: NShirish Pargaonkar <shirishp@gmail.com>
CC: Stable Kernel <stable@kernel.org>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 cc0bad75
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册