Skip to content

Commit

Permalink
AFS: afs_send_empty_reply() doesn't require an iovec array
Browse files Browse the repository at this point in the history
afs_send_empty_reply() doesn't require an iovec array with which to initialise
the msghdr, but can pass NULL instead.

Suggested-by: Al Viro <[email protected]>
Signed-off-by: David Howells <[email protected]>
  • Loading branch information
dhowells committed Apr 1, 2015
1 parent 382d797 commit bfd4e95
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/afs/rxrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,15 +770,12 @@ static int afs_deliver_cm_op_id(struct afs_call *call, struct sk_buff *skb,
void afs_send_empty_reply(struct afs_call *call)
{
struct msghdr msg;
struct kvec iov[1];

_enter("");

iov[0].iov_base = NULL;
iov[0].iov_len = 0;
msg.msg_name = NULL;
msg.msg_namelen = 0;
iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, iov, 0, 0); /* WTF? */
iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, NULL, 0, 0);
msg.msg_control = NULL;
msg.msg_controllen = 0;
msg.msg_flags = 0;
Expand Down

0 comments on commit bfd4e95

Please sign in to comment.