VirtualBox

Changeset 95210 in vbox for trunk/src/VBox/Additions/linux


Ignore:
Timestamp:
Jun 6, 2022 7:34:35 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
151718
Message:

Additions: Linux: vboxsf: Initial support for kernel 5.19(-rc1), bugref:10237.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/regops.c

    r94502 r95210  
    35823582 * shared+writeable fashion.
    35833583 */
     3584#if RTLNX_VER_MIN(5,19,0)
     3585static int vbsf_read_folio(struct file *file, struct folio *folio)
     3586{
     3587    struct page *page = &folio->page;
     3588#else
    35843589static int vbsf_readpage(struct file *file, struct page *page)
    35853590{
     3591#endif
    35863592    struct inode *inode = VBSF_GET_F_DENTRY(file)->d_inode;
    35873593    int           err;
     
    37293735 * Called when writing thru the page cache (which we shouldn't be doing).
    37303736 */
    3731 int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
    3732                      unsigned len, unsigned flags, struct page **pagep, void **fsdata)
     3737static inline void vbsf_write_begin_warn(loff_t pos, unsigned len, unsigned flags)
    37333738{
    37343739    /** @todo r=bird: We shouldn't ever get here, should we?  Because we don't use
     
    37463751# endif
    37473752    }
     3753}
     3754
     3755# if RTLNX_VER_MIN(5,19,0)
     3756int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
     3757                     unsigned len, struct page **pagep, void **fsdata)
     3758{
     3759    vbsf_write_begin_warn(pos, len, 0);
     3760    return simple_write_begin(file, mapping, pos, len, pagep, fsdata);
     3761}
     3762# else
     3763int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
     3764                     unsigned len, unsigned flags, struct page **pagep, void **fsdata)
     3765{
     3766    vbsf_write_begin_warn(pos, len, flags);
    37483767    return simple_write_begin(file, mapping, pos, len, flags, pagep, fsdata);
    37493768}
     3769# endif
     3770
    37503771#endif /* KERNEL_VERSION >= 2.6.24 */
    37513772
     
    38213842 */
    38223843struct address_space_operations vbsf_reg_aops = {
     3844#if RTLNX_VER_MIN(5,19,0)
     3845    .read_folio     = vbsf_read_folio,
     3846#else
    38233847    .readpage       = vbsf_readpage,
     3848#endif
    38243849    .writepage      = vbsf_writepage,
    38253850    /** @todo Need .writepages if we want msync performance...  */
     
    38433868#endif
    38443869};
    3845 
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette