patch-2.2.3 linux/mm/filemap.c

Next file: linux/mm/mmap.c
Previous file: linux/kernel/printk.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.2/linux/mm/filemap.c linux/mm/filemap.c
@@ -1334,8 +1334,6 @@
 	if (!inode->i_op || !inode->i_op->readpage)
 		return -ENOEXEC;
 	UPDATE_ATIME(inode);
-	vma->vm_file = file;
-	file->f_count++;
 	vma->vm_ops = ops;
 	return 0;
 }
@@ -1455,6 +1453,12 @@
 
 	if (!inode->i_op || !inode->i_op->updatepage)
 		return -EIO;
+
+	if (file->f_error) {
+		int error = file->f_error;
+		file->f_error = 0;
+		return error;
+	}
 
 	sync    = file->f_flags & O_SYNC;
 	written = 0;

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