patch-2.3.99-pre3 linux/arch/sparc64/kernel/sys_sparc32.c
Next file: linux/arch/sparc64/lib/memcmp.S
Previous file: linux/arch/sparc64/kernel/ioctl32.c
Back to the patch index
Back to the overall index
- Lines: 93
- Date:
Thu Mar 23 23:36:10 2000
- Orig file:
v2.3.99-pre2/linux/arch/sparc64/kernel/sys_sparc32.c
- Orig date:
Sun Mar 19 18:35:30 2000
diff -u --recursive --new-file v2.3.99-pre2/linux/arch/sparc64/kernel/sys_sparc32.c linux/arch/sparc64/kernel/sys_sparc32.c
@@ -1,4 +1,4 @@
-/* $Id: sys_sparc32.c,v 1.139 2000/03/16 20:37:57 davem Exp $
+/* $Id: sys_sparc32.c,v 1.141 2000/03/24 01:31:30 davem Exp $
* sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
@@ -3051,7 +3051,7 @@
do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs * regs)
{
struct linux_binprm bprm;
- struct dentry * dentry;
+ struct file * file;
int retval;
int i;
@@ -3059,28 +3059,24 @@
memset(bprm.page, 0, MAX_ARG_PAGES * sizeof(bprm.page[0]));
lock_kernel();
- dentry = open_namei(filename);
+ file = open_exec(filename);
unlock_kernel();
- retval = PTR_ERR(dentry);
- if (IS_ERR(dentry))
+ retval = PTR_ERR(file);
+ if (IS_ERR(file))
return retval;
- bprm.dentry = dentry;
+ bprm.file = file;
bprm.filename = filename;
bprm.sh_bang = 0;
bprm.loader = 0;
bprm.exec = 0;
if ((bprm.argc = count32(argv)) < 0) {
- lock_kernel();
- dput(dentry);
- unlock_kernel();
+ fput(file);
return bprm.argc;
}
if ((bprm.envc = count32(envp)) < 0) {
- lock_kernel();
- dput(dentry);
- unlock_kernel();
+ fput(file);
return bprm.envc;
}
@@ -3108,11 +3104,8 @@
out:
/* Something went wrong, return the inode and free the argument pages*/
- if (bprm.dentry) {
- lock_kernel();
- dput(bprm.dentry);
- unlock_kernel();
- }
+ if (bprm.file)
+ fput(bprm.file);
for (i=0 ; i<MAX_ARG_PAGES ; i++)
if (bprm.page[i])
@@ -3634,7 +3627,7 @@
union nfsctl_res32 {
__u8 cr32_getfh[NFS_FHSIZE];
- u32 cr32_debug;
+ struct knfsd_fh cr32_getfs;
};
static int nfs_svc32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
@@ -3760,15 +3753,12 @@
return err;
}
+/* This really doesn't need translations, we are only passing
+ * back a union which contains opaque nfs file handle data.
+ */
static int nfs_getfh32_res_trans(union nfsctl_res *kres, union nfsctl_res32 *res32)
{
- int err;
-
- err = copy_to_user(&res32->cr32_getfh,
- &kres->cr_getfh,
- sizeof(res32->cr32_getfh));
- err |= __put_user(kres->cr_debug, &res32->cr32_debug);
- return err;
+ return copy_to_user(res32, kres, sizeof(*res32));
}
extern asmlinkage int sys_nfsservctl(int cmd, void *arg, void *resp);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)