patch-2.3.99-pre7 linux/arch/mips/kernel/sysirix.c

Next file: linux/arch/mips/sgi/kernel/reset.c
Previous file: linux/arch/mips/kernel/head.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/arch/mips/kernel/sysirix.c linux/arch/mips/kernel/sysirix.c
@@ -724,7 +724,7 @@
 asmlinkage int irix_statfs(const char *path, struct irix_statfs *buf,
 			   int len, int fs_type)
 {
-	struct dentry *dentry;
+	struct nameidata nd;
 	struct statfs kbuf;
 	int error, i;
 
@@ -738,12 +738,11 @@
 	error = verify_area(VERIFY_WRITE, buf, sizeof(struct irix_statfs));
 	if (error)
 		goto out;
-	dentry = namei(path);
-	error = PTR_ERR(dentry);
-	if (IS_ERR(dentry))
+	error = user_path_walk(path, &nd);
+	if (error)
 		goto out;
 
-	error = vfs_statfs(dentry->d_inode->i_sb, &kbuf);
+	error = vfs_statfs(nd.dentry->d_inode->i_sb, &kbuf);
 	if (error)
 		goto dput_and_out;
 
@@ -761,7 +760,7 @@
 	error = 0;
 
 dput_and_out:
-	dput(dentry);
+	path_release(&nd);
 out:
 	unlock_kernel();
 	return error;
@@ -1484,7 +1483,7 @@
 
 asmlinkage int irix_statvfs(char *fname, struct irix_statvfs *buf)
 {
-	struct dentry *dentry;
+	struct nameidata nd;
 	struct statfs kbuf;
 	int error, i;
 
@@ -1494,11 +1493,10 @@
 	error = verify_area(VERIFY_WRITE, buf, sizeof(struct irix_statvfs));
 	if(error)
 		goto out;
-	dentry = namei(fname);
-	error = PTR_ERR(dentry);
-	if(!IS_ERR(dentry))
+	error = user_path_walk(fname, &nd);
+	if (err)
 		goto out;
-	error = vfs_statfs(dentry->d_inode->i_sb, &kbuf);
+	error = vfs_statfs(nd.dentry->d_inode->i_sb, &kbuf);
 	if (error)
 		goto dput_and_out;
 
@@ -1525,7 +1523,7 @@
 	error = 0;
 
 dput_and_out:
-	dput(dentry);
+	path_release(&nd);
 out:
 	unlock_kernel();
 	return error;
@@ -1759,7 +1757,7 @@
 
 asmlinkage int irix_statvfs64(char *fname, struct irix_statvfs64 *buf)
 {
-	struct dentry *dentry;
+	struct nameidata nd;
 	struct statfs kbuf;
 	int error, i;
 
@@ -1769,11 +1767,10 @@
 	error = verify_area(VERIFY_WRITE, buf, sizeof(struct irix_statvfs));
 	if(error)
 		goto out;
-	dentry = namei(fname);
-	error = PTR_ERR(dentry);
-	if(IS_ERR(dentry))
+	error = user_path_walk(fname, &nd);
+	if (error)
 		goto out;
-	error = vfs_statfs(dentry->d_inode->i_sb, &kbuf);
+	error = vfs_statfs(nd.dentry->d_inode->i_sb, &kbuf);
 	if (error)
 		goto dput_and_out;
 
@@ -1800,7 +1797,7 @@
 	error = 0;
 
 dput_and_out:
-	dput(dentry);
+	path_release(&nd);
 out:
 	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)