patch-2.2.3 linux/fs/nfs/file.c

Next file: linux/fs/nfs/inode.c
Previous file: linux/fs/nfs/dir.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.2/linux/fs/nfs/file.c linux/fs/nfs/file.c
@@ -97,7 +97,7 @@
 
 	status = nfs_wb_all(inode);
 	if (!status)
-		status = nfs_write_error(inode);
+		status = file->f_error;
 	return status;
 }
 
@@ -161,9 +161,11 @@
 
 	dfprintk(VFS, "nfs: fsync(%x/%ld)\n", inode->i_dev, inode->i_ino);
 
-	status = nfs_wb_pid(inode, current->pid);
-	if (!status)
-		status = nfs_write_error(inode);
+	status = nfs_wb_file(inode, file);
+	if (!status) {
+		status = file->f_error;
+		file->f_error = 0;
+	}
 	return status;
 }
 
@@ -193,10 +195,7 @@
 	if (!count)
 		goto out;
 
-	/* Check for an error from a previous async call */
-	result = nfs_write_error(inode);
-	if (!result)
-		result = generic_file_write(file, buf, count, ppos);
+	result = generic_file_write(file, buf, count, ppos);
 out:
 	return result;
 

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