Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328990
b: refs/heads/master
c: d6483b7
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Sep 27, 2012
1 parent 94b6436 commit 2fb05c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b48c5b2079af1f81d8f249ae07a988d8c45b32f
refs/heads/master: d6483b7a78438bc333560d11b69e6a6a6cf55940
12 changes: 5 additions & 7 deletions trunk/fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,23 +582,21 @@ SYSCALL_DEFINE3(lchown, const char __user *, filename, uid_t, user, gid_t, group

SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group)
{
struct file * file;
int error = -EBADF;
struct dentry * dentry;
struct file *file;
int error = -EBADF, fput_needed;

file = fget(fd);
file = fget_light(fd, &fput_needed);
if (!file)
goto out;

error = mnt_want_write_file(file);
if (error)
goto out_fput;
dentry = file->f_path.dentry;
audit_inode(NULL, dentry);
audit_inode(NULL, file->f_path.dentry);
error = chown_common(&file->f_path, user, group);
mnt_drop_write_file(file);
out_fput:
fput(file);
fput_light(file, fput_needed);
out:
return error;
}
Expand Down

0 comments on commit 2fb05c0

Please sign in to comment.