libafs: update uio resid in bypasscache
authorDerrick Brashear <shadow@your-file-system.com>
Sun, 8 Sep 2013 04:11:47 +0000 (00:11 -0400)
committerDerrick Brashear <shadow@your-file-system.com>
Thu, 12 Sep 2013 15:31:45 +0000 (08:31 -0700)
when we do a no cache read, we should decrease the resid as we use
up buffer... otherwise we have no idea in the caller how much data
actually got transferred

Change-Id: I50072fddcde1681b3760002d5065b1c2d9b97605
Reviewed-on: http://gerrit.openafs.org/10231
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/afs/afs_bypasscache.c

index 6988398..2e36d00 100644 (file)
@@ -434,6 +434,7 @@ afs_NoCacheFetchProc(struct rx_call *acall,
                        goto done;
                    }
                    size -= bytes;
+                   auio->uio_resid -= bytes;
                    iovno = 0;
                }
                pp = (bypass_page_t)auio->uio_iov[curpage].iov_base;