projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'please-pull-sys_bpf' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git]
/
fs
/
fcntl.c
diff --git
a/fs/fcntl.c
b/fs/fcntl.c
index 22d1c3df61acfa61ae957ede4aedfa01a3e9ab7a..99d440a4a6ba259e5bd7ec6b167dbedb2637ac5d 100644
(file)
--- a/
fs/fcntl.c
+++ b/
fs/fcntl.c
@@
-98,26
+98,19
@@
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
write_unlock_irq(&filp->f_owner.lock);
}
write_unlock_irq(&filp->f_owner.lock);
}
-
int
__f_setown(struct file *filp, struct pid *pid, enum pid_type type,
+
void
__f_setown(struct file *filp, struct pid *pid, enum pid_type type,
int force)
{
int force)
{
- int err;
-
- err = security_file_set_fowner(filp);
- if (err)
- return err;
-
+ security_file_set_fowner(filp);
f_modown(filp, pid, type, force);
f_modown(filp, pid, type, force);
- return 0;
}
EXPORT_SYMBOL(__f_setown);
}
EXPORT_SYMBOL(__f_setown);
-
int
f_setown(struct file *filp, unsigned long arg, int force)
+
void
f_setown(struct file *filp, unsigned long arg, int force)
{
enum pid_type type;
struct pid *pid;
int who = arg;
{
enum pid_type type;
struct pid *pid;
int who = arg;
- int result;
type = PIDTYPE_PID;
if (who < 0) {
type = PIDTYPE_PGID;
type = PIDTYPE_PID;
if (who < 0) {
type = PIDTYPE_PGID;
@@
-125,9
+118,8
@@
int f_setown(struct file *filp, unsigned long arg, int force)
}
rcu_read_lock();
pid = find_vpid(who);
}
rcu_read_lock();
pid = find_vpid(who);
-
result =
__f_setown(filp, pid, type, force);
+ __f_setown(filp, pid, type, force);
rcu_read_unlock();
rcu_read_unlock();
- return result;
}
EXPORT_SYMBOL(f_setown);
}
EXPORT_SYMBOL(f_setown);
@@
-181,7
+173,7
@@
static int f_setown_ex(struct file *filp, unsigned long arg)
if (owner.pid && !pid)
ret = -ESRCH;
else
if (owner.pid && !pid)
ret = -ESRCH;
else
-
ret =
__f_setown(filp, pid, type, 1);
+ __f_setown(filp, pid, type, 1);
rcu_read_unlock();
return ret;
rcu_read_unlock();
return ret;
@@
-302,7
+294,8
@@
static long do_fcntl(int fd, unsigned int cmd, unsigned long arg,
force_successful_syscall_return();
break;
case F_SETOWN:
force_successful_syscall_return();
break;
case F_SETOWN:
- err = f_setown(filp, arg, 1);
+ f_setown(filp, arg, 1);
+ err = 0;
break;
case F_GETOWN_EX:
err = f_getown_ex(filp, arg);
break;
case F_GETOWN_EX:
err = f_getown_ex(filp, arg);