Linux: Fix breakage in llseek error handling
authorSimon Wilkinson <sxw@your-file-system.com>
Tue, 2 Feb 2010 00:03:04 +0000 (00:03 +0000)
committerDerrick Brashear <shadow|account-1000005@unknown>
Tue, 2 Feb 2010 00:31:31 +0000 (16:31 -0800)
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 <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/afs/LINUX/osi_file.c

index e1a11fb..e322827 100644 (file)
@@ -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;