VirtualBox

Ignore:
Timestamp:
Oct 1, 2024 1:36:56 PM (5 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
164979
Message:

Additions: Linux: vboxsf: Introduce initial support for kernel 6.12, bugref:10782.

File:
1 edited

Legend:

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

    r106061 r106195  
    36823682    } else
    36833683        err = -EIO;
     3684#if RTLNX_VER_MAX(6,12,0)
    36843685    SetPageError(page);
     3686#endif
    36853687    unlock_page(page);
    36863688    return err;
     
    37413743                    i_size_write(inode, offEndOfWrite);
    37423744
     3745#if RTLNX_VER_MAX(6,12,0)
    37433746                /* Update and unlock the page. */
    37443747                if (PageError(page))
    37453748                    ClearPageError(page);
     3749#endif
    37463750                SetPageUptodate(page);
    37473751                unlock_page(page);
     
    37653769        err = -EIO;
    37663770    }
     3771#if RTLNX_VER_MAX(6,12,0)
    37673772    SetPageError(page);
     3773#endif
    37683774    unlock_page(page);
    37693775    return err;
     
    37933799}
    37943800
    3795 # if RTLNX_VER_MIN(5,19,0) || RTLNX_RHEL_RANGE(9,3, 9,99)
     3801# if RTLNX_VER_MIN(6,12,0)
     3802static int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
     3803                     unsigned len, struct folio **foliop, void **fsdata)
     3804{
     3805    vbsf_write_begin_warn(pos, len, 0);
     3806    return simple_write_begin(file, mapping, pos, len, foliop, fsdata);
     3807}
     3808# elif RTLNX_VER_MIN(5,19,0) || RTLNX_RHEL_RANGE(9,3, 9,99)
    37963809static int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
    37973810                     unsigned len, struct page **pagep, void **fsdata)
     
    38003813    return simple_write_begin(file, mapping, pos, len, pagep, fsdata);
    38013814}
    3802 # else
     3815# else /* KERNEL_VERSION <= 5.19 */
    38033816static int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
    38043817                     unsigned len, unsigned flags, struct page **pagep, void **fsdata)
     
    38073820    return simple_write_begin(file, mapping, pos, len, flags, pagep, fsdata);
    38083821}
    3809 # endif
     3822# endif /* KERNEL_VERSION >= 6.12 */
    38103823
    38113824#endif /* KERNEL_VERSION >= 2.6.24 */
     
    38153828 * Companion to vbsf_write_begin (i.e. shouldn't be called).
    38163829 */
     3830# if RTLNX_VER_MIN(6,12,0)
     3831static int vbsf_write_end(struct file *file, struct address_space *mapping,
     3832                          loff_t pos, unsigned int len, unsigned int copied,
     3833                          struct folio *folio, void *fsdata)
     3834# else /* KERNEL_VERSION <= 6.12 && KERNEL_VERSION >= 5.14 */
    38173835static int vbsf_write_end(struct file *file, struct address_space *mapping,
    38183836                          loff_t pos, unsigned int len, unsigned int copied,
    38193837                          struct page *page, void *fsdata)
     3838# endif /* KERNEL_VERSION >= 6.12 */
    38203839{
    38213840    static uint64_t volatile s_cCalls = 0;
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