VirtualBox

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


Ignore:
Timestamp:
Jul 30, 2015 3:52:53 PM (9 years ago)
Author:
vboxsync
Message:

Additions/linux/sharedfolders: Linux 4.2 fix

File:
1 edited

Legend:

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

    r35854 r57132  
    2121#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    2222
     23# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
     24static const char *sf_follow_link(struct dentry *dentry, void **cookie)
     25# else
    2326static void *sf_follow_link(struct dentry *dentry, struct nameidata *nd)
     27# endif
    2428{
    2529    struct inode *inode = dentry->d_inode;
     
    4145        }
    4246    }
     47# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
     48    return error ? ERR_PTR(error) : (*cookie = path);
     49# else
    4350    nd_set_link(nd, error ? ERR_PTR(error) : path);
    4451    return NULL;
     52# endif
    4553}
    4654
     55# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
    4756static void sf_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
    4857{
     
    5160        free_page((unsigned long)page);
    5261}
     62#endif
    5363
    5464struct inode_operations sf_lnk_iops =
     
    5666    .readlink       = generic_readlink,
    5767    .follow_link    = sf_follow_link,
     68# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
     69    .put_link       = free_page_put_link,
     70# else
    5871    .put_link       = sf_put_link
     72# endif
    5973};
    6074
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