summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-09-28 22:25:29 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-09-28 22:25:29 +0000
commit0ae8dceaebe3659ee0c3352c08125f403e77ebca (patch)
tree5085c389f09da78182b899d19fe1068b619a69dd /fs/nfs
parent273767781288c35c9d679e908672b9996cda4c34 (diff)
Merge with 2.3.10.
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/read.c5
-rw-r--r--fs/nfs/write.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 843f6b23e..899b62c82 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -90,8 +90,9 @@ nfs_readpage_sync(struct dentry *dentry, struct inode *inode, struct page *page)
/* Set up arguments and perform rpc call */
nfs_readreq_setup(&rqst, NFS_FH(dentry), offset, buffer, rsize);
- result = rpc_call(NFS_CLIENT(inode), NFSPROC_READ,
- &rqst.ra_args, &rqst.ra_res, flags);
+ lock_kernel();
+ result = rpc_call(NFS_CLIENT(inode), NFSPROC_READ, &rqst.ra_args, &rqst.ra_res, flags);
+ unlock_kernel();
/*
* Even if we had a partial success we can't mark the page
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 8b63cbf66..77c1db091 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -305,6 +305,7 @@ create_write_request(struct file * file, struct page *page, unsigned int offset,
goto out_req;
/* Put the task on inode's writeback request list. */
+ get_file(file);
wreq->wb_file = file;
wreq->wb_pid = current->pid;
wreq->wb_page = page;
@@ -467,7 +468,6 @@ nfs_updatepage(struct file *file, struct page *page, unsigned long offset, unsig
* The IO completion will then free the page and the dentry.
*/
get_page(page);
- atomic_inc(&file->f_count);
/* Schedule request */
synchronous = schedule_write_request(req, synchronous);