]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
AFS: afs_send_empty_reply() doesn't require an iovec array
authorDavid Howells <dhowells@redhat.com>
Wed, 1 Apr 2015 15:03:46 +0000 (16:03 +0100)
committerDavid Howells <dhowells@redhat.com>
Wed, 1 Apr 2015 15:03:46 +0000 (16:03 +0100)
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 <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/rxrpc.c

index dbc732e9a5c01eb18ab91af910a997881dfe5fd8..3a57a1b0fb510b8c8167835ca62eb06d0c4b53ca 100644 (file)
@@ -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;