VirtualBox

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


Ignore:
Timestamp:
Feb 23, 2015 5:07:55 PM (10 years ago)
Author:
vboxsync
Message:

Additions/linux/vboxsf: fix for Linux 4.0

File:
1 edited

Legend:

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

    r45300 r54391  
    9999#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    100100    inode->i_mapping->a_ops = &sf_reg_aops;
     101# if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 19, 0)
     102    /* XXX Was this ever necessary? */
    101103    inode->i_mapping->backing_dev_info = &sf_g->bdi;
     104# endif
    102105#endif
    103106
     
    864867{
    865868    int rc = 0;
     869#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && LINUX_VERSION_CODE <= KERNEL_VERSION(3, 19, 0)
    866870    /* Each new shared folder map gets a new uint64_t identifier,
    867871     * allocated in sequence.  We ASSUME the sequence will not wrap. */
     
    869873    uint64_t u64CurrentSequence = ASMAtomicIncU64(&s_u64Sequence);
    870874
    871 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    872875    sf_g->bdi.ra_pages = 0; /* No readahead */
    873876# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)
     
    886889#  endif /* >= 2.6.26 */
    887890# endif /* >= 2.6.24 */
    888 #endif /* >= 2.6.0 */
     891#endif /* >= 2.6.0 && <= 3.19.0 */
    889892    return rc;
    890893}
     
    892895void sf_done_backing_dev(struct sf_glob_info *sf_g)
    893896{
    894 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
     897#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) && LINUX_VERSION_CODE <= KERNEL_VERSION(3, 19, 0)
    895898    bdi_destroy(&sf_g->bdi); /* includes bdi_unregister() */
    896899#endif
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