VirtualBox

Changeset 88273 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Mar 24, 2021 12:18:49 PM (4 years ago)
Author:
vboxsync
Message:

GAs: Linux: make vboxsf working w/ 5.12-rc4 kernel, bugref:9976.

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

Legend:

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

    r85698 r88273  
    10451045 * @returns 0 on success, Linux error code otherwise
    10461046 */
    1047 #if RTLNX_VER_MIN(3,6,0) || defined(DOXYGEN_RUNNING)
     1047#if RTLNX_VER_MIN(5,12,0)
     1048static int vbsf_inode_create(struct user_namespace *ns, struct inode *parent, struct dentry *dentry, umode_t mode, bool excl)
     1049#elif RTLNX_VER_MIN(3,6,0) || defined(DOXYGEN_RUNNING)
    10481050static int vbsf_inode_create(struct inode *parent, struct dentry *dentry, umode_t mode, bool excl)
    10491051#elif RTLNX_VER_MIN(3,3,0)
     
    10821084 * @returns 0 on success, Linux error code otherwise
    10831085 */
    1084 #if RTLNX_VER_MIN(3,3,0)
     1086#if RTLNX_VER_MIN(5,12,0)
     1087static int vbsf_inode_mkdir(struct user_namespace *ns, struct inode *parent, struct dentry *dentry, umode_t mode)
     1088#elif RTLNX_VER_MIN(3,3,0)
    10851089static int vbsf_inode_mkdir(struct inode *parent, struct dentry *dentry, umode_t mode)
    10861090#else
     
    11941198 * @returns 0 on success, Linux error code otherwise
    11951199 */
     1200#if RTLNX_VER_MIN(5,12,0)
     1201static int vbsf_inode_rename(struct user_namespace *ns,
     1202                             struct inode *old_parent, struct dentry *old_dentry,
     1203                             struct inode *new_parent, struct dentry *new_dentry, unsigned flags)
     1204#else
    11961205static int vbsf_inode_rename(struct inode *old_parent, struct dentry *old_dentry,
    11971206                             struct inode *new_parent, struct dentry *new_dentry, unsigned flags)
     1207#endif
    11981208{
    11991209    /*
     
    13001310 * Create a symbolic link.
    13011311 */
     1312#if RTLNX_VER_MIN(5,12,0)
     1313static int vbsf_inode_symlink(struct user_namespace *ns, struct inode *parent, struct dentry *dentry, const char *target)
     1314#else
    13021315static int vbsf_inode_symlink(struct inode *parent, struct dentry *dentry, const char *target)
     1316#endif
    13031317{
    13041318    /*
  • trunk/src/VBox/Additions/linux/sharedfolders/utils.c

    r85698 r88273  
    701701#if RTLNX_VER_MIN(2,5,18)
    702702
    703 # if RTLNX_VER_MIN(4,11,0)
     703#if RTLNX_VER_MIN(5,12,0)
     704int vbsf_inode_getattr(struct user_namespace *ns, const struct path *path,
     705    struct kstat *kstat, u32 request_mask, unsigned int flags)
     706# elif RTLNX_VER_MIN(4,11,0)
    704707int vbsf_inode_getattr(const struct path *path, struct kstat *kstat, u32 request_mask, unsigned int flags)
    705708# else
     
    741744    if (rc == 0) {
    742745        /* Do generic filling in of info. */
     746# if RTLNX_VER_MIN(5,12,0)
     747        generic_fillattr(ns, dentry->d_inode, kstat);
     748# else
    743749        generic_fillattr(dentry->d_inode, kstat);
     750# endif
    744751
    745752        /* Add birth time. */
     
    787794 * Modify inode attributes.
    788795 */
     796#if RTLNX_VER_MIN(5,12,0)
     797int vbsf_inode_setattr(struct user_namespace *ns, struct dentry *dentry, struct iattr *iattr)
     798#else
    789799int vbsf_inode_setattr(struct dentry *dentry, struct iattr *iattr)
     800#endif
    790801{
    791802    struct inode           *pInode     = dentry->d_inode;
     
    807818    iattr->ia_valid |= ATTR_FORCE;
    808819#if (RTLNX_VER_RANGE(3,16,39,  3,17,0)) || RTLNX_VER_MIN(4,9,0) || (RTLNX_VER_RANGE(4,1,37,  4,2,0))
     820# if RTLNX_VER_MIN(5,12,0)
     821    rc = setattr_prepare(ns, dentry, iattr);
     822# else
    809823    rc = setattr_prepare(dentry, iattr);
     824# endif
    810825#else
    811826    rc = inode_change_ok(pInode, iattr);
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.h

    r87056 r88273  
    265265extern int  vbsf_inode_revalidate_with_handle(struct dentry *dentry, SHFLHANDLE hHostFile, bool fForced, bool fInodeLocked);
    266266#if RTLNX_VER_MIN(2,5,18)
    267 # if RTLNX_VER_MIN(4,11,0)
     267# if RTLNX_VER_MIN(5,12,0)
     268extern int  vbsf_inode_getattr(struct user_namespace *ns, const struct path *path,
     269    struct kstat *kstat, u32 request_mask, unsigned int query_flags);
     270# elif RTLNX_VER_MIN(4,11,0)
    268271extern int  vbsf_inode_getattr(const struct path *path, struct kstat *kstat, u32 request_mask, unsigned int query_flags);
    269272# else
     
    273276extern int  vbsf_inode_revalidate(struct dentry *dentry);
    274277#endif /* < 2.5.44 */
     278#if RTLNX_VER_MIN(5,12,0)
     279extern int  vbsf_inode_setattr(struct user_namespace *ns, struct dentry *dentry, struct iattr *iattr);
     280#else
    275281extern int  vbsf_inode_setattr(struct dentry *dentry, struct iattr *iattr);
     282#endif
    276283
    277284
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