diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-27 14:48:26 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 21:10:25 -0400 |
commit | cb0942b81249798e15c3f04eee2946ef543e8115 (patch) | |
tree | 7d494c580a847342577661782c5173f76178aa81 /net | |
parent | cecb46f194460d23cacf3b13593f9f5a4f7a0fed (diff) |
make get_file() return its argument
simplifies a bunch of callers...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net')
-rw-r--r-- | net/compat.c | 3 | ||||
-rw-r--r-- | net/core/scm.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/net/compat.c b/net/compat.c index 74ed1d7a84a2..79ae88485001 100644 --- a/net/compat.c +++ b/net/compat.c | |||
@@ -301,8 +301,7 @@ void scm_detach_fds_compat(struct msghdr *kmsg, struct scm_cookie *scm) | |||
301 | break; | 301 | break; |
302 | } | 302 | } |
303 | /* Bump the usage count and install the file. */ | 303 | /* Bump the usage count and install the file. */ |
304 | get_file(fp[i]); | 304 | fd_install(new_fd, get_file(fp[i])); |
305 | fd_install(new_fd, fp[i]); | ||
306 | } | 305 | } |
307 | 306 | ||
308 | if (i > 0) { | 307 | if (i > 0) { |
diff --git a/net/core/scm.c b/net/core/scm.c index 040cebeed45b..b0098d259233 100644 --- a/net/core/scm.c +++ b/net/core/scm.c | |||
@@ -281,11 +281,10 @@ void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm) | |||
281 | break; | 281 | break; |
282 | } | 282 | } |
283 | /* Bump the usage count and install the file. */ | 283 | /* Bump the usage count and install the file. */ |
284 | get_file(fp[i]); | ||
285 | sock = sock_from_file(fp[i], &err); | 284 | sock = sock_from_file(fp[i], &err); |
286 | if (sock) | 285 | if (sock) |
287 | sock_update_netprioidx(sock->sk, current); | 286 | sock_update_netprioidx(sock->sk, current); |
288 | fd_install(new_fd, fp[i]); | 287 | fd_install(new_fd, get_file(fp[i])); |
289 | } | 288 | } |
290 | 289 | ||
291 | if (i > 0) | 290 | if (i > 0) |