patch-2.3.24 linux/fs/fat/file.c

Next file: linux/fs/fat/mmap.c
Previous file: linux/fs/fat/fatfs_syms.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.23/linux/fs/fat/file.c linux/fs/fat/file.c
@@ -115,13 +115,13 @@
 	struct inode *inode = dentry->d_inode;
 	struct page *new_page, **hash;
 	unsigned long pgpos;
-	unsigned long page_cache = 0;
+	struct page *page_cache = NULL;
 	long status;
 
 	pgpos = MSDOS_I(inode)->i_realsize & PAGE_CACHE_MASK;
 	while (pgpos < page->offset) {
-		hash = page_hash(inode, pgpos);
-repeat_find:	new_page = __find_lock_page(inode, pgpos, hash);
+		hash = page_hash(&inode->i_data, pgpos);
+repeat_find:	new_page = __find_lock_page(&inode->i_data, pgpos, hash);
 		if (!new_page) {
 			if (!page_cache) {
 				page_cache = page_cache_alloc();
@@ -130,10 +130,10 @@
 				status = -ENOMEM;
 				goto out;
 			}
-			new_page = page_cache_entry(page_cache);
-			if (add_to_page_cache_unique(new_page,inode,pgpos,hash))
+			new_page = page_cache;
+			if (add_to_page_cache_unique(new_page,&inode->i_data,pgpos,hash))
 				goto repeat_find;
-			page_cache = 0;
+			page_cache = NULL;
 		}
 		status = block_write_cont_page(file, new_page, PAGE_SIZE, 0, NULL);
 		UnlockPage(new_page);

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