patch-2.3.99-pre7 linux/arch/sparc64/solaris/fs.c

Next file: linux/arch/sparc64/solaris/misc.c
Previous file: linux/arch/sparc64/prom/misc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/arch/sparc64/solaris/fs.c linux/arch/sparc64/solaris/fs.c
@@ -1,4 +1,4 @@
-/* $Id: fs.c,v 1.18 2000/04/08 02:11:54 davem Exp $
+/* $Id: fs.c,v 1.19 2000/05/09 04:48:35 davem Exp $
  * fs.c: fs related syscall emulation for Solaris
  *
  * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
@@ -477,17 +477,15 @@
 
 asmlinkage int solaris_statvfs(u32 path, u32 buf)
 {
-	struct dentry * dentry;
+	struct nameidata nd;
 	int error;
 
 	lock_kernel();
-	dentry = namei((const char *)A(path));
-	error = PTR_ERR(dentry);
-	if (!IS_ERR(dentry)) {
-		struct inode * inode = dentry->d_inode;
-
+	error = user_path_walk((const char *)A(path),&nd);
+	if (!error) {
+		struct inode * inode = nd.dentry->d_inode;
 		error = report_statvfs(inode, buf);
-		dput(dentry);
+		path_release(&nd);
 	}
 	unlock_kernel();
 	return error;
@@ -512,17 +510,15 @@
 
 asmlinkage int solaris_statvfs64(u32 path, u32 buf)
 {
-	struct dentry * dentry;
+	struct nameidata nd;
 	int error;
 
 	lock_kernel();
-	dentry = namei((const char *)A(path));
-	error = PTR_ERR(dentry);
-	if (!IS_ERR(dentry)) {
-		struct inode * inode = dentry->d_inode;
-
+	error = user_path_walk((const char *)A(path), &nd);
+	if (!error) {
+		struct inode * inode = nd.dentry->d_inode;
 		error = report_statvfs64(inode, buf);
-		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)