From: Matt Benjamin Date: Sun, 29 Aug 2010 19:06:22 +0000 (-0400) Subject: cache bypass Also increment page refcount in readpage X-Git-Tag: openafs-devel-1_5_77~28 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=91be7d3b69627fe2920c6ab1b9eaac341cd87903;p=packages%2Fo%2Fopenafs.git cache bypass Also increment page refcount in readpage 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 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit aaf9b4ddd5ce9ed83be038bba01199b1d400ddf3) Reviewed-on: http://gerrit.openafs.org/2685 --- diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 2e4318e50..23f7d3b0f 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -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));