patch-2.3.7 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
- Lines: 37
- Date:
Sat Jun 19 11:45:28 1999
- Orig file:
v2.3.6/linux/fs/nfs/file.c
- Orig date:
Wed Jun 2 13:46:59 1999
diff -u --recursive --new-file v2.3.6/linux/fs/nfs/file.c linux/fs/nfs/file.c
@@ -26,6 +26,7 @@
#include <linux/malloc.h>
#include <linux/pagemap.h>
#include <linux/lockd/bind.h>
+#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/segment.h>
@@ -70,13 +71,13 @@
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
+ NULL, /* bmap */
nfs_readpage, /* readpage */
nfs_writepage, /* writepage */
- NULL, /* bmap */
+ NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
- NULL, /* updatepage */
nfs_revalidate, /* revalidate */
};
@@ -172,8 +173,11 @@
bytes -= copy_from_user((u8*)page_address(page) + offset, buf, bytes);
status = -EFAULT;
- if (bytes)
+ if (bytes) {
+ lock_kernel();
status = nfs_updatepage(file, page, offset, bytes);
+ unlock_kernel();
+ }
return status;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)