diff options
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r-- | fs/cifs/dir.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 7c0a81283645..d3671f2acb29 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -398,7 +398,16 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry, | |||
398 | * in network traffic in the other paths. | 398 | * in network traffic in the other paths. |
399 | */ | 399 | */ |
400 | if (!(oflags & O_CREAT)) { | 400 | if (!(oflags & O_CREAT)) { |
401 | struct dentry *res = cifs_lookup(inode, direntry, 0); | 401 | struct dentry *res; |
402 | |||
403 | /* | ||
404 | * Check for hashed negative dentry. We have already revalidated | ||
405 | * the dentry and it is fine. No need to perform another lookup. | ||
406 | */ | ||
407 | if (!d_unhashed(direntry)) | ||
408 | return -ENOENT; | ||
409 | |||
410 | res = cifs_lookup(inode, direntry, 0); | ||
402 | if (IS_ERR(res)) | 411 | if (IS_ERR(res)) |
403 | return PTR_ERR(res); | 412 | return PTR_ERR(res); |
404 | 413 | ||