diff options
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c index 726d211db484..33e9495a3129 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1558,8 +1558,6 @@ static int lookup_fast(struct nameidata *nd, | |||
1558 | negative = d_is_negative(dentry); | 1558 | negative = d_is_negative(dentry); |
1559 | if (read_seqcount_retry(&dentry->d_seq, seq)) | 1559 | if (read_seqcount_retry(&dentry->d_seq, seq)) |
1560 | return -ECHILD; | 1560 | return -ECHILD; |
1561 | if (negative) | ||
1562 | return -ENOENT; | ||
1563 | 1561 | ||
1564 | /* | 1562 | /* |
1565 | * This sequence count validates that the parent had no | 1563 | * This sequence count validates that the parent had no |
@@ -1580,6 +1578,12 @@ static int lookup_fast(struct nameidata *nd, | |||
1580 | goto unlazy; | 1578 | goto unlazy; |
1581 | } | 1579 | } |
1582 | } | 1580 | } |
1581 | /* | ||
1582 | * Note: do negative dentry check after revalidation in | ||
1583 | * case that drops it. | ||
1584 | */ | ||
1585 | if (negative) | ||
1586 | return -ENOENT; | ||
1583 | path->mnt = mnt; | 1587 | path->mnt = mnt; |
1584 | path->dentry = dentry; | 1588 | path->dentry = dentry; |
1585 | if (likely(__follow_mount_rcu(nd, path, inode, seqp))) | 1589 | if (likely(__follow_mount_rcu(nd, path, inode, seqp))) |