mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
parent
7e3fb5842e
commit
173c84012a
1 changed files with 5 additions and 6 deletions
11
fs/open.c
11
fs/open.c
|
|
@ -485,14 +485,13 @@ out_unlock:
|
|||
|
||||
SYSCALL_DEFINE2(fchmod, unsigned int, fd, umode_t, mode)
|
||||
{
|
||||
struct file * file;
|
||||
struct fd f = fdget(fd);
|
||||
int err = -EBADF;
|
||||
|
||||
file = fget(fd);
|
||||
if (file) {
|
||||
audit_inode(NULL, file->f_path.dentry, 0);
|
||||
err = chmod_common(&file->f_path, mode);
|
||||
fput(file);
|
||||
if (f.file) {
|
||||
audit_inode(NULL, f.file->f_path.dentry, 0);
|
||||
err = chmod_common(&f.file->f_path, mode);
|
||||
fdput(f);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue