hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/target/target_core_file.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*******************************************************************************
23 * Filename: target_core_file.c
34 *
....@@ -6,20 +7,6 @@
67 * (c) Copyright 2005-2013 Datera, Inc.
78 *
89 * Nicholas A. Bellinger <nab@kernel.org>
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License as published by
12
- * the Free Software Foundation; either version 2 of the License, or
13
- * (at your option) any later version.
14
- *
15
- * This program is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- * GNU General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU General Public License
21
- * along with this program; if not, write to the Free Software
22
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2310 *
2411 ******************************************************************************/
2512
....@@ -303,7 +290,7 @@
303290 len += sg->length;
304291 }
305292
306
- iov_iter_bvec(&iter, ITER_BVEC | is_write, bvec, sgl_nents, len);
293
+ iov_iter_bvec(&iter, is_write, bvec, sgl_nents, len);
307294
308295 aio_cmd->cmd = cmd;
309296 aio_cmd->len = len;
....@@ -353,7 +340,7 @@
353340 len += sg->length;
354341 }
355342
356
- iov_iter_bvec(&iter, ITER_BVEC, bvec, sgl_nents, len);
343
+ iov_iter_bvec(&iter, is_write, bvec, sgl_nents, len);
357344 if (is_write)
358345 ret = vfs_iter_write(fd, &iter, &pos, 0);
359346 else
....@@ -490,7 +477,7 @@
490477 len += se_dev->dev_attrib.block_size;
491478 }
492479
493
- iov_iter_bvec(&iter, ITER_BVEC, bvec, nolb, len);
480
+ iov_iter_bvec(&iter, WRITE, bvec, nolb, len);
494481 ret = vfs_iter_write(fd_dev->fd_file, &iter, &pos, 0);
495482
496483 kfree(bvec);
....@@ -969,6 +956,7 @@
969956 MODULE_DESCRIPTION("TCM FILEIO subsystem plugin");
970957 MODULE_AUTHOR("nab@Linux-iSCSI.org");
971958 MODULE_LICENSE("GPL");
959
+MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
972960
973961 module_init(fileio_module_init);
974962 module_exit(fileio_module_exit);