aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/proc.c')
-rw-r--r--fs/nfs/proc.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c
index 4529cc4f3f8f..10f5e80ca157 100644
--- a/fs/nfs/proc.c
+++ b/fs/nfs/proc.c
@@ -215,32 +215,6 @@ static int nfs_proc_read(struct nfs_read_data *rdata)
215 return status; 215 return status;
216} 216}
217 217
218static int nfs_proc_write(struct nfs_write_data *wdata)
219{
220 int flags = wdata->flags;
221 struct inode * inode = wdata->inode;
222 struct nfs_fattr * fattr = wdata->res.fattr;
223 struct rpc_message msg = {
224 .rpc_proc = &nfs_procedures[NFSPROC_WRITE],
225 .rpc_argp = &wdata->args,
226 .rpc_resp = &wdata->res,
227 .rpc_cred = wdata->cred,
228 };
229 int status;
230
231 dprintk("NFS call write %d @ %Ld\n", wdata->args.count,
232 (long long) wdata->args.offset);
233 nfs_fattr_init(fattr);
234 status = rpc_call_sync(NFS_CLIENT(inode), &msg, flags);
235 if (status >= 0) {
236 nfs_post_op_update_inode(inode, fattr);
237 wdata->res.count = wdata->args.count;
238 wdata->verf.committed = NFS_FILE_SYNC;
239 }
240 dprintk("NFS reply write: %d\n", status);
241 return status < 0? status : wdata->res.count;
242}
243
244static int 218static int
245nfs_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr, 219nfs_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
246 int flags, struct nameidata *nd) 220 int flags, struct nameidata *nd)
@@ -545,13 +519,10 @@ nfs_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
545 }; 519 };
546 int status; 520 int status;
547 521
548 lock_kernel();
549
550 dprintk("NFS call readdir %d\n", (unsigned int)cookie); 522 dprintk("NFS call readdir %d\n", (unsigned int)cookie);
551 status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); 523 status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
552 524
553 dprintk("NFS reply readdir: %d\n", status); 525 dprintk("NFS reply readdir: %d\n", status);
554 unlock_kernel();
555 return status; 526 return status;
556} 527}
557 528
@@ -696,8 +667,6 @@ const struct nfs_rpc_ops nfs_v2_clientops = {
696 .access = NULL, /* access */ 667 .access = NULL, /* access */
697 .readlink = nfs_proc_readlink, 668 .readlink = nfs_proc_readlink,
698 .read = nfs_proc_read, 669 .read = nfs_proc_read,
699 .write = nfs_proc_write,
700 .commit = NULL, /* commit */
701 .create = nfs_proc_create, 670 .create = nfs_proc_create,
702 .remove = nfs_proc_remove, 671 .remove = nfs_proc_remove,
703 .unlink_setup = nfs_proc_unlink_setup, 672 .unlink_setup = nfs_proc_unlink_setup,