2021-10-21 19:55:02 +02:00
|
|
|
Index: VirtualBox-6.1.28/src/VBox/Additions/linux/sharedfolders/regops.c
|
2021-07-14 18:47:06 +02:00
|
|
|
===================================================================
|
2021-10-21 19:55:02 +02:00
|
|
|
--- VirtualBox-6.1.28.orig/src/VBox/Additions/linux/sharedfolders/regops.c
|
|
|
|
+++ VirtualBox-6.1.28/src/VBox/Additions/linux/sharedfolders/regops.c
|
|
|
|
@@ -2138,7 +2138,11 @@ static int vbsf_iter_lock_pages(struct i
|
2021-07-14 18:47:06 +02:00
|
|
|
int rc = 0;
|
|
|
|
|
|
|
|
Assert(iov_iter_count(iter) + pStash->cb > 0);
|
|
|
|
+#if RTLNX_VER_MAX(5, 14,0)
|
2021-10-21 19:55:02 +02:00
|
|
|
if (!(VBSF_GET_ITER_TYPE(iter) & ITER_KVEC)) {
|
2021-07-14 18:47:06 +02:00
|
|
|
+#else
|
2021-07-21 03:05:06 +02:00
|
|
|
+ if (!iov_iter_is_kvec(iter)) {
|
2021-07-14 18:47:06 +02:00
|
|
|
+#endif
|
|
|
|
/*
|
|
|
|
* Do we have a stashed page?
|
|
|
|
*/
|
2021-10-21 19:55:02 +02:00
|
|
|
@@ -2385,7 +2389,11 @@ static size_t vbsf_iter_max_span_of_page
|
2021-07-14 18:47:06 +02:00
|
|
|
{
|
|
|
|
size_t cPages;
|
|
|
|
# if RTLNX_VER_MIN(3,16,0)
|
|
|
|
+# if RTLNX_VER_MAX(5, 14, 0)
|
2021-10-21 19:55:02 +02:00
|
|
|
if (iter_is_iovec(iter) || (VBSF_GET_ITER_TYPE(iter) & ITER_KVEC)) {
|
2021-07-14 18:47:06 +02:00
|
|
|
+#else
|
2021-07-21 03:05:06 +02:00
|
|
|
+ if (iter_is_iovec(iter) || iov_iter_is_kvec(iter)) {
|
2021-07-14 18:47:06 +02:00
|
|
|
+#endif
|
2021-10-21 19:55:02 +02:00
|
|
|
# endif
|
2021-07-14 18:47:06 +02:00
|
|
|
const struct iovec *pCurIov = iter->iov;
|
|
|
|
size_t cLeft = iter->nr_segs;
|
2021-10-21 19:55:02 +02:00
|
|
|
@@ -2448,7 +2456,11 @@ static size_t vbsf_iter_max_span_of_page
|
2021-07-14 18:47:06 +02:00
|
|
|
} else {
|
|
|
|
/* Won't bother with accurate counts for the next two types, just make
|
|
|
|
some rough estimates (does pipes have segments?): */
|
|
|
|
+#if RTLNX_VER_MAX(5, 14,0)
|
2021-10-21 19:55:02 +02:00
|
|
|
size_t cSegs = VBSF_GET_ITER_TYPE(iter) & ITER_BVEC ? RT_MAX(1, iter->nr_segs) : 1;
|
2021-07-14 18:47:06 +02:00
|
|
|
+#else
|
|
|
|
+ size_t cSegs = (iov_iter_type(iter) == ITER_BVEC) ? RT_MAX(1, iter->nr_segs) : 1;
|
|
|
|
+#endif
|
|
|
|
cPages = (iov_iter_count(iter) + (PAGE_SIZE * 2 - 2) * cSegs) >> PAGE_SHIFT;
|
|
|
|
}
|
|
|
|
# endif
|
2021-10-21 19:55:02 +02:00
|
|
|
@@ -3831,7 +3843,9 @@ struct address_space_operations vbsf_reg
|
|
|
|
.write_end = vbsf_write_end,
|
|
|
|
#elif RTLNX_VER_MIN(2,6,24)
|
2021-07-14 18:47:06 +02:00
|
|
|
.write_begin = vbsf_write_begin,
|
|
|
|
+#if RTLNX_VER_MAX(5, 14, 0)
|
|
|
|
.write_end = simple_write_end,
|
|
|
|
+#endif
|
|
|
|
#elif RTLNX_VER_MIN(2,5,45)
|
|
|
|
.prepare_write = simple_prepare_write,
|
|
|
|
.commit_write = simple_commit_write,
|