VirtualBox

Ignore:
Timestamp:
Jan 7, 2015 10:23:32 AM (10 years ago)
Author:
vboxsync
Message:

Linux Additions / sharedfolders: Linux 3.19 adaptions

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

Legend:

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

    r48529 r53757  
    127127    TRACE();
    128128
    129     sf_g = GET_GLOB_INFO(dir->f_dentry->d_inode->i_sb);
     129    inode = GET_F_DENTRY(dir)->d_inode;
     130    sf_i = GET_INODE_INFO(inode);
     131    sf_g = GET_GLOB_INFO(inode->i_sb);
    130132    sf_d = dir->private_data;
    131133
    132134    BUG_ON(!sf_g);
    133135    BUG_ON(!sf_d);
    134 
    135     inode = dir->f_dentry->d_inode;
    136     sf_i = GET_INODE_INFO(inode);
    137 
    138136    BUG_ON(!sf_i);
    139137
  • trunk/src/VBox/Additions/linux/sharedfolders/regops.c

    r51622 r53757  
    109109    size_t left = size;
    110110    ssize_t total_bytes_read = 0;
    111     struct inode *inode = file->f_dentry->d_inode;
     111    struct inode *inode = GET_F_DENTRY(file)->d_inode;
    112112    struct sf_glob_info *sf_g = GET_GLOB_INFO(inode->i_sb);
    113113    struct sf_reg_info *sf_r = file->private_data;
     
    184184    size_t left = size;
    185185    ssize_t total_bytes_written = 0;
    186     struct inode *inode = file->f_dentry->d_inode;
     186    struct inode *inode = GET_F_DENTRY(file)->d_inode;
    187187    struct sf_inode_info *sf_i = GET_INODE_INFO(inode);
    188188    struct sf_glob_info *sf_g = GET_GLOB_INFO(inode->i_sb);
     
    455455static struct page *sf_reg_nopage(struct vm_area_struct *vma, unsigned long vaddr, int *type)
    456456# define SET_TYPE(t) *type = (t)
    457 #else /* LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 0) */
     457#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) */
    458458static struct page *sf_reg_nopage(struct vm_area_struct *vma, unsigned long vaddr, int unused)
    459459# define SET_TYPE(t)
     
    466466    int err;
    467467    struct file *file = vma->vm_file;
    468     struct inode *inode = file->f_dentry->d_inode;
     468    struct inode *inode = GET_F_DENTRY(file)->d_inode;
    469469    struct sf_glob_info *sf_g = GET_GLOB_INFO(inode->i_sb);
    470470    struct sf_reg_info *sf_r = file->private_data;
     
    606606static int sf_readpage(struct file *file, struct page *page)
    607607{
    608     struct inode *inode = file->f_dentry->d_inode;
     608    struct inode *inode = GET_F_DENTRY(file)->d_inode;
    609609    struct sf_glob_info *sf_g = GET_GLOB_INFO(inode->i_sb);
    610610    struct sf_reg_info *sf_r = file->private_data;
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.h

    r38811 r53757  
    146146#endif
    147147
    148 #if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 19) || defined(KERNEL_FC6)
     148#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) || defined(KERNEL_FC6)
    149149/* FC6 kernel 2.6.18, vanilla kernel 2.6.19+ */
    150150# define GET_INODE_INFO(i)       ((struct sf_inode_info *) (i)->i_private)
     
    156156#endif
    157157
     158#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
     159# define GET_F_DENTRY(f)        (f->f_path.dentry)
     160#else
     161# define GET_F_DENTRY(f)        (f->f_dentry)
    158162#endif
    159163
     164#endif
     165
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