]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
cache bypass Also increment page refcount in readpage
authorMatt Benjamin <matt@linuxbox.com>
Sun, 29 Aug 2010 19:06:22 +0000 (15:06 -0400)
committerDerrick Brashear <shadow@dementia.org>
Tue, 7 Sep 2010 18:45:46 +0000 (11:45 -0700)
As noticed by a commenter, afs_linux_bypass_readpage needs
the same get_page operation as in afs_linux_bypass_readpages,
as background page accounting assumes we have done it.

Change-Id: Ib2e1cb7ec971e68b022dd1740584369d04b8b833
Reviewed-on: http://gerrit.openafs.org/2626
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit aaf9b4ddd5ce9ed83be038bba01199b1d400ddf3)
Reviewed-on: http://gerrit.openafs.org/2685

src/afs/LINUX/osi_vnodeops.c

index 2e4318e502c849fdbb9e519ef5baabb1f31cc57c..23f7d3b0f07da2f422293b51ba328aed16280899 100644 (file)
@@ -1829,7 +1829,7 @@ afs_linux_bypass_readpage(struct file *fp, struct page *pp)
              PAGE_SIZE, UIO_READ, AFS_UIOSYS);
 
     /* save the page for background map */
-    /* XXX - Shouldn't we get a reference count here? */
+    get_page(pp); /* see above */
     auio->uio_iov->iov_base = (void*) pp;
     /* the background thread will free this */
     ancr = osi_Alloc(sizeof(struct nocache_read_request));