diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-28 22:58:42 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-28 22:58:42 +0000 |
commit | eed6b7c84cc33f229f6fecd884d9a22af5bec514 (patch) | |
tree | 422a7a49328c59053f4fb11805adb753523c2f2c /fs/namei.c | |
parent | a3b90e3c6976551acbac09f5aacd736a1658aaa8 (diff) |
Merge with Linux 2.4.0-test5-pre6.
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c index 8653e20ab..b85a6419d 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -292,13 +292,15 @@ static struct dentry * real_lookup(struct dentry * parent, struct qstr * name, i /* * Uhhuh! Nasty case: the cache was re-populated while - * we waited on the semaphore. Need to revalidate, but - * we're going to return this entry regardless (same - * as if it was busy). + * we waited on the semaphore. Need to revalidate. */ up(&dir->i_sem); - if (result->d_op && result->d_op->d_revalidate) - result->d_op->d_revalidate(result, flags); + if (result->d_op && result->d_op->d_revalidate) { + if (!result->d_op->d_revalidate(result, flags) && !d_invalidate(result)) { + dput(result); + result = ERR_PTR(-ENOENT); + } + } return result; } |