patch-2.3.99-pre9 linux/fs/nfs/proc.c

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

diff -u --recursive --new-file v2.3.99-pre8/linux/fs/nfs/proc.c linux/fs/nfs/proc.c
@@ -122,14 +122,16 @@
 }
 
 static int
-nfs_proc_read(struct dentry *dentry, struct nfs_fattr *fattr, int flags,
+nfs_proc_read(struct file *file, struct nfs_fattr *fattr, int flags,
 	      loff_t offset, unsigned int count, void *buffer, int *eofp)
 {
+	struct dentry		*dentry = file->f_dentry;
+	struct rpc_cred		*cred = nfs_file_cred(file);
 	struct nfs_readargs	arg = { NFS_FH(dentry), offset, count, 1,
 				       {{ buffer, count }, {0,0}, {0,0}, {0,0},
 					{0,0}, {0,0}, {0,0}, {0,0}} };
 	struct nfs_readres	res = { fattr, count, 0};
-	struct rpc_message	msg = { NFSPROC_READ, &arg, &res, NULL };
+	struct rpc_message	msg = { NFSPROC_READ, &arg, &res, cred };
 	int			status;
 
 	dprintk("NFS call  read %d @ %Ld\n", count, (long long)offset);
@@ -142,16 +144,18 @@
 }
 
 static int
-nfs_proc_write(struct dentry *dentry, struct nfs_fattr *fattr, int how,
+nfs_proc_write(struct file *file, struct nfs_fattr *fattr, int how,
 	       loff_t offset, unsigned int count,
 	       void *buffer, struct nfs_writeverf *verf)
 {
+	struct dentry		*dentry = file->f_dentry;
+	struct rpc_cred		*cred = nfs_file_cred(file);
 	struct nfs_writeargs	arg = {NFS_FH(dentry), offset, count,
 					NFS_FILE_SYNC, 1,
 					{{buffer, count}, {0,0}, {0,0}, {0,0},
 					 {0,0}, {0,0}, {0,0}, {0,0}}};
 	struct nfs_writeres     res = {fattr, verf, count};
-	struct rpc_message	msg = { NFSPROC_WRITE, &arg, &res, NULL };
+	struct rpc_message	msg = { NFSPROC_WRITE, &arg, &res, cred };
 	int			status, flags = 0;
 
 	dprintk("NFS call  write %d @ %Ld\n", count, (long long)offset);
@@ -311,12 +315,14 @@
  * from nfs_readdir by calling the decode_entry function directly.
  */
 static int
-nfs_proc_readdir(struct dentry *dir, __u64 cookie, void *entry, 
+nfs_proc_readdir(struct file *file, __u64 cookie, void *entry, 
 		 unsigned int size, int plus)
 {
+	struct dentry		*dir = file->f_dentry;
+	struct rpc_cred		*cred = nfs_file_cred(file);
 	struct nfs_readdirargs	arg;
 	struct nfs_readdirres	res;
-	struct rpc_message	msg = { NFSPROC_READDIR, &arg, &res, NULL };
+	struct rpc_message	msg = { NFSPROC_READDIR, &arg, &res, cred };
 	struct nfs_server       *server = NFS_DSERVER(dir);
 	int			status;
 

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen (who was at: [email protected])