DEVEL15-linux-mmap-antirecursion-avoid-spurious-eio-20090526

LICENSE IPL10

fix error code checking


(cherry picked from commit 1fb1b8d0a2f82c6e72e59afb0a400ea0d5b21fe1)
This commit is contained in:
Russ Allbery 2009-05-27 00:44:39 +00:00 committed by Derrick Brashear
parent e18dd8ff1e
commit f021b9ccd9

View File

@ -1188,7 +1188,7 @@ afs_linux_lookup(struct inode *dip, struct dentry *dp)
if (code == ENOENT)
return ERR_PTR(0);
#endif
else if ((code > 0) && (code <= MAX_ERRNO))
else if ((code >= 0) && (code <= MAX_ERRNO))
return ERR_PTR(-code);
else
return ERR_PTR(-EIO);