Whamcloud - gitweb
fix minor kmap/kunmap mismatch.
authorbraam <braam>
Thu, 8 Nov 2001 18:56:34 +0000 (18:56 +0000)
committerbraam <braam>
Thu, 8 Nov 2001 18:56:34 +0000 (18:56 +0000)
lustre/obdfs/rw.c

index 71b27da..4daede5 100644 (file)
@@ -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) {