Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 52fe696

Browse files
Additions: Linux: vboxsf: Add initial support for kernel 6.16, bugref:10908.
Deprecated interface ->writepage() is commented out, ->writepages() needs to be implemented on the next iteration. This commit fixes build issue and keeps vboxsf functional on kernel 6.16. svn:sync-xref-src-repo-rev: r169091
1 parent c4934d3 commit 52fe696

File tree

1 file changed

+12
-8
lines changed
  • src/VBox/Additions/linux/sharedfolders

1 file changed

+12
-8
lines changed

‎src/VBox/Additions/linux/sharedfolders/regops.c‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: regops.c 108498 2025-02-21 11:57:46Z vadim.galitsyn@oracle.com $ */
1+
/* $Id: regops.c 109747 2025-06-02 17:38:05Z vadim.galitsyn@oracle.com $ */
22
/** @file
33
* vboxsf - VBox Linux Shared Folders VFS, regular file inode and file operations.
44
*/
@@ -3695,11 +3695,12 @@ static int vbsf_readpage(struct file *file, struct page *page)
36953695
* Needed for mmap and writes when the file is mmapped in a shared+writeable
36963696
* fashion.
36973697
*/
3698-
#if RTLNX_VER_MIN(2,5,52)
3698+
#if RTLNX_VER_MAX(6,16,0)
3699+
# if RTLNX_VER_MIN(2,5,52)
36993700
static int vbsf_writepage(struct page *page, struct writeback_control *wbc)
3700-
#else
3701+
#else
37013702
static int vbsf_writepage(struct page *page)
3702-
#endif
3703+
#endif
37033704
{
37043705
struct address_space *mapping = page->mapping;
37053706
struct inode *inode = mapping->host;
@@ -3742,11 +3743,11 @@ static int vbsf_writepage(struct page *page)
37423743
&& offEndOfWrite > i_size_read(inode))
37433744
i_size_write(inode, offEndOfWrite);
37443745

3745-
#if RTLNX_VER_MAX(6,12,0)
3746+
#if RTLNX_VER_MAX(6,12,0)
37463747
/* Update and unlock the page. */
37473748
if (PageError(page))
37483749
ClearPageError(page);
3749-
#endif
3750+
#endif
37503751
SetPageUptodate(page);
37513752
unlock_page(page);
37523753

@@ -3768,12 +3769,13 @@ static int vbsf_writepage(struct page *page)
37683769
printk("vbsf_writepage: no writable handle for %s..\n", sf_i->path->String.ach);
37693770
err = -EIO;
37703771
}
3771-
#if RTLNX_VER_MAX(6,12,0)
3772+
#if RTLNX_VER_MAX(6,12,0)
37723773
SetPageError(page);
3773-
#endif
3774+
#endif
37743775
unlock_page(page);
37753776
return err;
37763777
}
3778+
#endif /* < 6.16.0 */
37773779

37783780

37793781
#if RTLNX_VER_MIN(2,6,24)
@@ -3905,7 +3907,9 @@ struct address_space_operations vbsf_reg_aops = {
39053907
#else
39063908
.readpage = vbsf_readpage,
39073909
#endif
3910+
#if RTLNX_VER_MAX(6,16,0)
39083911
.writepage = vbsf_writepage,
3912+
#endif
39093913
/** @todo Need .writepages if we want msync performance... */
39103914
#if RTLNX_VER_MIN(5,18,0) || RTLNX_RHEL_RANGE(9,2, 9,99)
39113915
.dirty_folio = filemap_dirty_folio,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /