From 08c9b0f6d390a8851bb00b0f8394bcdc51f90180 Mon Sep 17 00:00:00 2001 From: Derek Atkins Date: Sun, 21 Apr 2002 06:13:01 +0000 Subject: [PATCH] The problem is that on 2.4 the 'code' variable is over-written during the path walk, such that by the time it's checking if the inode exists, code is already '0'. But if the inode does not exist, code should be ENOENT to show that the file does not exist. (cherry picked from commit f3bcfda51f5aa1185c3fab6b1c56d5c5165426f1) --- src/afs/LINUX/osi_misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/afs/LINUX/osi_misc.c b/src/afs/LINUX/osi_misc.c index 1609f37e7..245c74cb9 100644 --- a/src/afs/LINUX/osi_misc.c +++ b/src/afs/LINUX/osi_misc.c @@ -51,7 +51,8 @@ int osi_lookupname(char *aname, uio_seg_t seg, int followlink, if (nd.dentry->d_inode) { *dpp = dget(nd.dentry); code = 0; - } + } else + code = ENOENT; path_release(&nd); } #else -- 2.39.5