diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-07-29 03:58:24 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-07-29 03:58:24 +0000 |
commit | 1c5c0c934f91fbce2825acbb849e98781e774c1d (patch) | |
tree | 12b5ae03516d4103bc070e4579ae1f7f71c27d24 /fs/open.c | |
parent | 4fe70c31de87823ac9e804f4795589ba74dc6971 (diff) |
Merge with 2.1.47. Some more cleanup and module fixes.
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 35 |
1 files changed, 6 insertions, 29 deletions
@@ -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) |