Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262482
b: refs/heads/master
c: 728ffb8
h: refs/heads/master
v: v3
  • Loading branch information
Anton Blanchard authored and David S. Miller committed Aug 5, 2011
1 parent 42254cb commit c3ce560
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 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: d3e614577198757d5854caa912e88f2d4296479b
refs/heads/master: 728ffb86f10873aaf4abd26dde691ee40ae731fe
27 changes: 3 additions & 24 deletions trunk/net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -2005,12 +2005,9 @@ int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
if (!sock)
return err;

err = sock_error(sock->sk);
if (err)
goto out_put;

entry = mmsg;
compat_entry = (struct compat_mmsghdr __user *)mmsg;
err = 0;

while (datagrams < vlen) {
/*
Expand All @@ -2037,29 +2034,11 @@ int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
++datagrams;
}

out_put:
fput_light(sock->file, fput_needed);

if (err == 0)
return datagrams;

if (datagrams != 0) {
/*
* We may send less entries than requested (vlen) if the
* sock is non blocking...
*/
if (err != -EAGAIN) {
/*
* ... or if sendmsg returns an error after we
* send some datagrams, where we record the
* error to return on the next call or if the
* app asks about it using getsockopt(SO_ERROR).
*/
sock->sk->sk_err = -err;
}

/* We only return an error if no datagrams were able to be sent */
if (datagrams != 0)
return datagrams;
}

return err;
}
Expand Down

0 comments on commit c3ce560

Please sign in to comment.