summaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-07-29 03:58:24 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-07-29 03:58:24 +0000
commit1c5c0c934f91fbce2825acbb849e98781e774c1d (patch)
tree12b5ae03516d4103bc070e4579ae1f7f71c27d24 /fs/open.c
parent4fe70c31de87823ac9e804f4795589ba74dc6971 (diff)
Merge with 2.1.47. Some more cleanup and module fixes.
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/fs/open.c b/fs/open.c
index 3408fb2a6..36669e4a6 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -543,44 +543,21 @@ out:
return error;
}
-asmlinkage int sys_lchown(const char * filename, uid_t user, gid_t group)
-{
- struct dentry * dentry;
- int error;
-
- lock_kernel();
- dentry = lnamei(filename);
-
- error = PTR_ERR(dentry);
- if (IS_ERR(dentry))
- goto out;
-
- error = chown_common(dentry, user, group);
-
- dput(dentry);
-out:
- unlock_kernel();
- return(error);
-}
-
asmlinkage int sys_chown(const char * filename, uid_t user, gid_t group)
{
struct dentry * dentry;
int error;
lock_kernel();
- dentry = namei(filename);
+ dentry = lnamei(filename);
error = PTR_ERR(dentry);
- if (IS_ERR(dentry))
- goto out;
-
- error = chown_common(dentry, user, group);
-
- dput(dentry);
-out:
+ if (!IS_ERR(dentry)) {
+ error = chown_common(dentry, user, group);
+ dput(dentry);
+ }
unlock_kernel();
- return(error);
+ return error;
}
asmlinkage int sys_fchown(unsigned int fd, uid_t user, gid_t group)