summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/sysirix.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-05-12 21:05:59 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-05-12 21:05:59 +0000
commitba2dacab305c598cd4c34a604f8e276bf5bab5ff (patch)
tree78670a0139bf4d5ace617b29b7eba82bbc74d602 /arch/mips/kernel/sysirix.c
parentb77bf69998121e689c5e86cc5630d39a0a9ee6ca (diff)
Merge with Linux 2.3.99-pre7 and various other bits.
Diffstat (limited to 'arch/mips/kernel/sysirix.c')
-rw-r--r--arch/mips/kernel/sysirix.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c
index db0229802..847acadd9 100644
--- a/arch/mips/kernel/sysirix.c
+++ b/arch/mips/kernel/sysirix.c
@@ -724,7 +724,7 @@ struct irix_statfs {
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 @@ asmlinkage int irix_statfs(const char *path, struct irix_statfs *buf,
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 @@ asmlinkage int irix_statfs(const char *path, struct irix_statfs *buf,
error = 0;
dput_and_out:
- dput(dentry);
+ path_release(&nd);
out:
unlock_kernel();
return error;
@@ -1482,7 +1481,7 @@ struct irix_statvfs {
asmlinkage int irix_statvfs(char *fname, struct irix_statvfs *buf)
{
- struct dentry *dentry;
+ struct nameidata nd;
struct statfs kbuf;
int error, i;
@@ -1490,13 +1489,12 @@ asmlinkage int irix_statvfs(char *fname, struct irix_statvfs *buf)
printk("[%s:%ld] Wheee.. irix_statvfs(%s,%p)\n",
current->comm, current->pid, fname, buf);
error = verify_area(VERIFY_WRITE, buf, sizeof(struct irix_statvfs));
- if(error)
+ 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;
@@ -1523,7 +1521,7 @@ asmlinkage int irix_statvfs(char *fname, struct irix_statvfs *buf)
error = 0;
dput_and_out:
- dput(dentry);
+ path_release(&nd);
out:
unlock_kernel();
return error;
@@ -1757,7 +1755,7 @@ struct irix_statvfs64 {
asmlinkage int irix_statvfs64(char *fname, struct irix_statvfs64 *buf)
{
- struct dentry *dentry;
+ struct nameidata nd;
struct statfs kbuf;
int error, i;
@@ -1767,11 +1765,10 @@ asmlinkage int irix_statvfs64(char *fname, struct irix_statvfs64 *buf)
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;
@@ -1798,7 +1795,7 @@ asmlinkage int irix_statvfs64(char *fname, struct irix_statvfs64 *buf)
error = 0;
dput_and_out:
- dput(dentry);
+ path_release(&nd);
out:
unlock_kernel();
return error;