From: Derek Atkins Date: Sun, 21 Apr 2002 06:13:01 +0000 (+0000) Subject: The problem is that on 2.4 the 'code' variable is over-written during X-Git-Tag: openafs-stable-1_2_4~48 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=08c9b0f6d390a8851bb00b0f8394bcdc51f90180;p=packages%2Fo%2Fopenafs.git 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) --- 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