summaryrefslogtreecommitdiffstats
path: root/security/selinux
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-27 20:48:26 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-27 03:10:25 +0200
commitcb0942b81249798e15c3f04eee2946ef543e8115 (patch)
tree7d494c580a847342577661782c5173f76178aa81 /security/selinux
parentvhost_set_vring(): turn pollstart/pollstop into bool (diff)
downloadlinux-cb0942b81249798e15c3f04eee2946ef543e8115.tar.xz
linux-cb0942b81249798e15c3f04eee2946ef543e8115.zip
make get_file() return its argument
simplifies a bunch of callers... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-rw-r--r--security/selinux/hooks.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 4dfbcea10eb7..651d8456611a 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2135,8 +2135,7 @@ static inline void flush_unauthorized_files(const struct cred *cred,
if (!IS_ERR(devnull)) {
/* replace all the matching ones with this */
do {
- get_file(devnull);
- replace_fd(n - 1, devnull, 0);
+ replace_fd(n - 1, get_file(devnull), 0);
} while ((n = iterate_fd(files, n, match_file, cred)) != 0);
fput(devnull);
} else {