From aaf9b4ddd5ce9ed83be038bba01199b1d400ddf3 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Sun, 29 Aug 2010 15:06:22 -0400 Subject: [PATCH] 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 --- src/afs/LINUX/osi_vnodeops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 2e4318e502..23f7d3b0f0 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));