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

Next file: linux/fs/file.c
Previous file: linux/fs/ext2/truncate.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.24/linux/fs/fat/file.c linux/fs/fat/file.c
@@ -118,8 +118,8 @@
 	struct page *page_cache = NULL;
 	long status;
 
-	pgpos = MSDOS_I(inode)->i_realsize & PAGE_CACHE_MASK;
-	while (pgpos < page->offset) {
+	pgpos = MSDOS_I(inode)->i_realsize >> PAGE_CACHE_SHIFT;
+	while (pgpos < page->index) {
 		hash = page_hash(&inode->i_data, pgpos);
 repeat_find:	new_page = __find_lock_page(&inode->i_data, pgpos, hash);
 		if (!new_page) {
@@ -140,7 +140,7 @@
 		page_cache_release(new_page);
 		if (status < 0)
 			goto out;
-		pgpos = MSDOS_I(inode)->i_realsize & PAGE_CACHE_MASK;
+		pgpos = MSDOS_I(inode)->i_realsize >> PAGE_CACHE_SHIFT;
 	}
 	status = block_write_cont_page(file, page, offset, bytes, buf);
 out:

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