From: Simon Wilkinson Date: Tue, 2 Feb 2010 00:03:04 +0000 (+0000) Subject: Linux: Fix breakage in llseek error handling X-Git-Tag: openafs-devel-1_5_72~74 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c75396e23a50a144de6d08d57304c1803722ead2;p=packages%2Fo%2Fopenafs.git Linux: Fix breakage in llseek error handling Commit 7a5cee30cc5f0e6d5780387633ce2b46608fd5fb changed the way that errors from llseek are dealt with. Unfortunately, it is missing some all important bracing, and so we end up going down the error path, even when the llseek succeeds. My fault. Sorry. Change-Id: I03061ba0663b610a8fb73a08d257f6d786795076 Reviewed-on: http://gerrit.openafs.org/1194 Reviewed-by: Marc Dionne Tested-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c index e1a11fb3b..e3228279d 100644 --- a/src/afs/LINUX/osi_file.c +++ b/src/afs/LINUX/osi_file.c @@ -386,9 +386,10 @@ osi_rdwr(struct osi_file *osifile, uio_t * uiop, int rw) /* seek to the desired position. Return -1 on error. */ if (filp->f_op->llseek) { - if (filp->f_op->llseek(filp, (loff_t) uiop->uio_offset, 0) != uiop->uio_offset) + if (filp->f_op->llseek(filp, (loff_t) uiop->uio_offset, 0) != uiop->uio_offset) { code = -1; goto out; + } } else filp->f_pos = uiop->uio_offset;