VirtualBox

Changeset 82166 in vbox for trunk/src


Ignore:
Timestamp:
Nov 25, 2019 11:32:20 AM (5 years ago)
Author:
vboxsync
Message:

linux/vboxsf: Workaround for missing noop_backing_dev_info export in 4.0 and 4.1. bugref:9172

Location:
trunk/src/VBox/Additions/linux/sharedfolders
Files:
2 edited

Legend:

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

    r79472 r82166  
    365365    struct backing_dev_info *bdi;
    366366
     367#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
     368    pSuperInfo->bdi_org = sb->s_bdi;
     369#endif
     370
    367371#  if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
    368372    rc = super_setup_bdi_name(sb, "vboxsf-%llu", (unsigned long long)idSeqMine);
     
    435439#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) && LINUX_VERSION_CODE <= KERNEL_VERSION(4, 12, 0)
    436440    bdi_destroy(&pSuperInfo->bdi);    /* includes bdi_unregister() */
    437 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
     441# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
     442    sb->s_bdi = pSuperInfo->bdi_org; /* (noop_backing_dev_info is not exported) */
     443# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
    438444    sb->s_bdi = &noop_backing_dev_info;
    439445# endif
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.h

    r78660 r82166  
    160160    /** The time to live for inode information in milliseconds, for /proc/mounts. */
    161161    int32_t                 msInodeTTL;
     162#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
     163    /** 4.0 and 4.1 are missing noop_backing_dev_info export, so take down the
     164     *  initial value so we can restore it in vbsf_done_backing_dev(). (paranoia) */
     165    struct backing_dev_info *bdi_org;
     166#endif
    162167};
    163168
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