From 51f71e533b20cd875eec8adda71edea044a606da Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 11 Nov 2011 11:00:47 -0500 Subject: [PATCH] namei: tweak getlinkbyte error handling in the event of a pread error, add the same error exit path trigger that we have elsewhere Change-Id: Id7a371f3fd710f3c6dad21bccb0662cf8562d99f Reviewed-on: http://gerrit.openafs.org/5843 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/vol/namei_ops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vol/namei_ops.c b/src/vol/namei_ops.c index d1ecabf6ae..cd92457889 100644 --- a/src/vol/namei_ops.c +++ b/src/vol/namei_ops.c @@ -1371,6 +1371,9 @@ namei_GetLinkCount(FdHandle_t * h, Inode ino, int lockit, int fixup, int nowrite } rc = FDH_PREAD(h, (char*)&row, sizeof(row), offset); + if (rc == -1) + goto bad_getLinkByte; + if ((rc == 0 || !((row >> index) & NAMEI_TAGMASK)) && fixup && nowrite) return 1; if (rc == 0 && fixup) {