patch-2.4.4 linux/fs/romfs/inode.c

Next file: linux/fs/smbfs/getopt.c
Previous file: linux/fs/reiserfs/tail_conversion.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.3/linux/fs/romfs/inode.c linux/fs/romfs/inode.c
@@ -403,9 +403,11 @@
 	void *buf;
 	int result = -EIO;
 
+	page_cache_get(page);
 	lock_kernel();
-	get_page(page);
-	buf = page_address(page);
+	buf = kmap(page);
+	if (!buf)
+		goto err_out;
 
 	/* 32 bit warning -- but not for us :) */
 	offset = page->index << PAGE_CACHE_SHIFT;
@@ -428,7 +430,9 @@
 
 	UnlockPage(page);
 
-	__free_page(page);
+	kunmap(page);
+err_out:
+	page_cache_release(page);
 	unlock_kernel();
 
 	return result;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)