From caddaccddc96157ca40256de789471a409d13d4f Mon Sep 17 00:00:00 2001 From: braam Date: Thu, 8 Nov 2001 18:56:34 +0000 Subject: [PATCH] fix minor kmap/kunmap mismatch. --- lustre/obdfs/rw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/obdfs/rw.c b/lustre/obdfs/rw.c index 71b27da..4daede5 100644 --- a/lustre/obdfs/rw.c +++ b/lustre/obdfs/rw.c @@ -199,6 +199,7 @@ int obdfs_readpage(struct file *file, struct page *page) if ( ((inode->i_size + PAGE_CACHE_SIZE -1)>>PAGE_SHIFT) <= page->index) { memset(kmap(page), 0, PAGE_CACHE_SIZE); + kunmap(page); goto readpage_out; } @@ -551,7 +552,6 @@ int obdfs_commit_write(struct file *file, struct page *page, unsigned from, unsi if (cache_writes == 0) { rc = obdfs_commit_page(page, 1, from, to); - kunmap(page); } if (len > inode->i_size) { -- 1.8.3.1