hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/9p/trans_virtio.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * The Virtio 9p transport driver
34 *
....@@ -8,22 +9,6 @@
89 *
910 * Based on virtio console driver
1011 * Copyright (C) 2006, 2007 Rusty Russell, IBM Corporation
11
- *
12
- * This program is free software; you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License version 2
14
- * as published by the Free Software Foundation.
15
- *
16
- * This program is distributed in the hope that it will be useful,
17
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- * GNU General Public License for more details.
20
- *
21
- * You should have received a copy of the GNU General Public License
22
- * along with this program; if not, write to:
23
- * Free Software Foundation
24
- * 51 Franklin Street, Fifth Floor
25
- * Boston, MA 02111-1301 USA
26
- *
2712 */
2813
2914 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -329,7 +314,7 @@
329314 if (!iov_iter_count(data))
330315 return 0;
331316
332
- if (!(data->type & ITER_KVEC)) {
317
+ if (!iov_iter_is_kvec(data)) {
333318 int n;
334319 /*
335320 * We allow only p9_max_pages pinned. We wait for the
....@@ -409,7 +394,7 @@
409394 struct page **in_pages = NULL, **out_pages = NULL;
410395 struct virtio_chan *chan = client->trans;
411396 struct scatterlist *sgs[4];
412
- size_t offs;
397
+ size_t offs = 0;
413398 int need_drop = 0;
414399 int kicked = 0;
415400