Update patch for 867344
This commit is contained in:
parent
631b8185a4
commit
3c9b3f75ac
@ -1,21 +1,19 @@
|
|||||||
@@ -, +, @@
|
@@ -, +, @@
|
||||||
negative dentry
|
cifs_atomic_open
|
||||||
BUG_ON(!d_unhashed(entry));
|
fs/cifs/dir.c | 6 ++++++
|
||||||
fs/cifs/dir.c | 7 ++++++-
|
1 file changed, 6 insertions(+)
|
||||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
||||||
--- a/fs/cifs/dir.c
|
--- a/fs/cifs/dir.c
|
||||||
+++ a/fs/cifs/dir.c
|
+++ a/fs/cifs/dir.c
|
||||||
@@ -398,7 +398,12 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
@@ -398,6 +398,12 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
||||||
* in network traffic in the other paths.
|
* in network traffic in the other paths.
|
||||||
*/
|
*/
|
||||||
if (!(oflags & O_CREAT)) {
|
if (!(oflags & O_CREAT)) {
|
||||||
- struct dentry *res = cifs_lookup(inode, direntry, 0);
|
+ /* Check for hashed negative dentry. We have already revalidated
|
||||||
+ struct dentry *res;
|
+ * the dentry and it is fine. No need to perform another lookup.
|
||||||
+
|
+ */
|
||||||
+ if (!direntry->d_inode)
|
+ if (!d_unhashed(direntry))
|
||||||
+ return -ENOENT;
|
+ return -ENOENT;
|
||||||
+
|
+
|
||||||
+ res = cifs_lookup(inode, direntry, 0);
|
struct dentry *res = cifs_lookup(inode, direntry, 0);
|
||||||
if (IS_ERR(res))
|
if (IS_ERR(res))
|
||||||
return PTR_ERR(res);
|
return PTR_ERR(res);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user