diff -u --recursive --new-file linux-2.4.6-mmap/fs/nfs/file.c linux-2.4.6-file/fs/nfs/file.c --- linux-2.4.6-mmap/fs/nfs/file.c Tue May 22 18:26:06 2001 +++ linux-2.4.6-file/fs/nfs/file.c Fri Jun 22 18:43:34 2001 @@ -162,9 +162,18 @@ */ static int nfs_prepare_write(struct file *file, struct page *page, unsigned offset, unsigned to) { + int status; + kmap(page); - return nfs_flush_incompatible(file, page); + status = nfs_flush_incompatible(file, page); + if (status) + goto out_err; + return 0; + out_err: + kunmap(page); + return status; } + static int nfs_commit_write(struct file *file, struct page *page, unsigned offset, unsigned to) { long status;