]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/scsi/st.c
treewide: Add SPDX license identifier for more missed files
[mirror_ubuntu-jammy-kernel.git] / drivers / scsi / st.c
index 19c022e66d6348e444933c38bfb6ef00d91918f5..baada5b50bb1194d6905c90598a587f4931d8bc9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
    SCSI Tape Driver for Linux version 1.1 and newer. See the accompanying
    file Documentation/scsi/st.txt for more information.
@@ -4922,7 +4923,8 @@ static int sgl_map_user_pages(struct st_buffer *STbp,
 
         /* Try to fault in all of the necessary pages */
         /* rw==READ means read from drive, write into memory area */
-       res = get_user_pages_fast(uaddr, nr_pages, rw == READ, pages);
+       res = get_user_pages_fast(uaddr, nr_pages, rw == READ ? FOLL_WRITE : 0,
+                                 pages);
 
        /* Errors and no page mapped should return here */
        if (res < nr_pages)