patch-2.3.99-pre7 linux/arch/sparc64/kernel/sys_sparc32.c
Next file: linux/arch/sparc64/kernel/sys_sunos32.c
Previous file: linux/arch/sparc64/kernel/sys_sparc.c
Back to the patch index
Back to the overall index
- Lines: 70
- Date:
Mon May 8 22:21:57 2000
- Orig file:
v2.3.99-pre6/linux/arch/sparc64/kernel/sys_sparc32.c
- Orig date:
Wed Apr 26 16:34:07 2000
diff -u --recursive --new-file v2.3.99-pre6/linux/arch/sparc64/kernel/sys_sparc32.c linux/arch/sparc64/kernel/sys_sparc32.c
@@ -1,4 +1,4 @@
-/* $Id: sys_sparc32.c,v 1.145 2000/04/13 07:30:34 jj Exp $
+/* $Id: sys_sparc32.c,v 1.146 2000/05/09 04:48:34 davem Exp $
* sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
@@ -1584,25 +1584,23 @@
asmlinkage int sys32_newstat(char * filename, struct stat32 *statbuf)
{
- struct dentry *dentry;
+ struct nameidata nd;
int error;
lock_kernel();
- dentry = namei(filename);
-
- error = PTR_ERR(dentry);
- if (!IS_ERR(dentry)) {
- struct inode *inode = dentry->d_inode;
+ error = user_path_walk(filename, &nd);
+ if (!error) {
+ struct inode *inode = nd.dentry->d_inode;
if (inode->i_op &&
inode->i_op->revalidate)
- error = inode->i_op->revalidate(dentry);
+ error = inode->i_op->revalidate(nd.dentry);
else
error = 0;
if (!error)
error = cp_new_stat32(inode, statbuf);
- dput(dentry);
+ path_release(&nd);
}
unlock_kernel();
return error;
@@ -1610,25 +1608,23 @@
asmlinkage int sys32_newlstat(char * filename, struct stat32 *statbuf)
{
- struct dentry *dentry;
+ struct nameidata nd;
int error;
lock_kernel();
- dentry = lnamei(filename);
-
- error = PTR_ERR(dentry);
- if (!IS_ERR(dentry)) {
- struct inode *inode = dentry->d_inode;
+ error = user_path_walk_link(filename, &nd);
+ if (!error) {
+ struct inode *inode = nd.dentry->d_inode;
if (inode->i_op &&
inode->i_op->revalidate)
- error = inode->i_op->revalidate(dentry);
+ error = inode->i_op->revalidate(nd.dentry);
else
error = 0;
if (!error)
error = cp_new_stat32(inode, statbuf);
- dput(dentry);
+ path_release(&nd);
}
unlock_kernel();
return error;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)