mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-12 20:22:05 +01:00
18 lines
598 B
Diff
18 lines
598 B
Diff
--- scst-1.0.1.1/src/dev_handlers/scst_vdisk.c.orig
|
|
+++ scst-1.0.1.1/src/dev_handlers/scst_vdisk.c
|
|
@@ -2071,9 +2071,13 @@
|
|
inode = file->f_dentry->d_inode;
|
|
mapping = file->f_mapping;
|
|
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
|
|
res = sync_page_range(inode, mapping, loff, len);
|
|
+#else
|
|
+ res = filemap_write_and_wait_range(file->f_mapping, loff, len);
|
|
+#endif
|
|
if (unlikely(res != 0)) {
|
|
- PRINT_ERROR("sync_page_range() failed (%d)", res);
|
|
+ PRINT_ERROR("sync range failed (%d)", res);
|
|
if (cmd != NULL) {
|
|
scst_set_cmd_error(cmd,
|
|
SCST_LOAD_SENSE(scst_sense_write_error));
|