patch-2.3.99-pre7 linux/arch/alpha/kernel/osf_sys.c

Next file: linux/arch/alpha/lib/copy_user.S
Previous file: linux/arch/alpha/defconfig
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/arch/alpha/kernel/osf_sys.c linux/arch/alpha/kernel/osf_sys.c
@@ -302,17 +302,14 @@
 
 asmlinkage int osf_statfs(char *path, struct osf_statfs *buffer, unsigned long bufsiz)
 {
-	struct dentry *dentry;
+	struct nameidata nd;
 	int retval;
 
-	lock_kernel();
-	dentry = namei(path);
-	retval = PTR_ERR(dentry);
-	if (!IS_ERR(dentry)) {
-		retval = do_osf_statfs(dentry, buffer, bufsiz);
-		dput(dentry);
+	retval = user_path_walk(path, &nd);
+	if (!retval) {
+		retval = do_osf_statfs(nd.dentry, buffer, bufsiz);
+		path_release(&nd);
 	}
-	unlock_kernel();
 	return retval;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)