Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 438110 | Differences between
and this patch

Collapse All | Expand All

(-)a/modules/linux/vmblock/linux/dentry.c (+12 lines)
Lines 32-38 Link Here
32
#include "block.h"
32
#include "block.h"
33
33
34
34
35
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
36
static int DentryOpRevalidate(struct dentry *dentry, unsigned int flags);
37
#else
35
static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd);
38
static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd);
39
#endif
36
40
37
struct dentry_operations LinkDentryOps = {
41
struct dentry_operations LinkDentryOps = {
38
   .d_revalidate = DentryOpRevalidate,
42
   .d_revalidate = DentryOpRevalidate,
Lines 60-66 struct dentry_operations LinkDentryOps = Link Here
60
64
61
static int
65
static int
62
DentryOpRevalidate(struct dentry *dentry,  // IN: dentry revalidating
66
DentryOpRevalidate(struct dentry *dentry,  // IN: dentry revalidating
67
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
68
		   unsigned int flags)
69
#else
63
                   struct nameidata *nd)   // IN: lookup flags & intent
70
                   struct nameidata *nd)   // IN: lookup flags & intent
71
#endif
64
{
72
{
65
   VMBlockInodeInfo *iinfo;
73
   VMBlockInodeInfo *iinfo;
66
   struct nameidata actualNd;
74
   struct nameidata actualNd;
Lines 101-107 DentryOpRevalidate(struct dentry *dentry Link Here
101
   if (actualDentry &&
109
   if (actualDentry &&
102
       actualDentry->d_op &&
110
       actualDentry->d_op &&
103
       actualDentry->d_op->d_revalidate) {
111
       actualDentry->d_op->d_revalidate) {
112
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
113
      return actualDentry->d_op->d_revalidate(actualDentry, flags);
114
#else
104
      return actualDentry->d_op->d_revalidate(actualDentry, nd);
115
      return actualDentry->d_op->d_revalidate(actualDentry, nd);
116
#endif
105
   }
117
   }
106
118
107
   if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
119
   if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
(-)a/modules/linux/vmblock/linux/inode.c (+9 lines)
Lines 35-42 Link Here
35
35
36
36
37
/* Inode operations */
37
/* Inode operations */
38
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
39
static struct dentry *InodeOpLookup(struct inode *dir,
40
                                    struct dentry *dentry, unsigned int flags);
41
#else
38
static struct dentry *InodeOpLookup(struct inode *dir,
42
static struct dentry *InodeOpLookup(struct inode *dir,
39
                                    struct dentry *dentry, struct nameidata *nd);
43
                                    struct dentry *dentry, struct nameidata *nd);
44
#endif
40
static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
45
static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
41
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
46
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
42
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
47
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
Lines 75-81 static struct inode_operations LinkInode Link Here
75
static struct dentry *
80
static struct dentry *
76
InodeOpLookup(struct inode *dir,      // IN: parent directory's inode
81
InodeOpLookup(struct inode *dir,      // IN: parent directory's inode
77
              struct dentry *dentry,  // IN: dentry to lookup
82
              struct dentry *dentry,  // IN: dentry to lookup
83
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
84
	      unsigned int flags)
85
#else
78
              struct nameidata *nd)   // IN: lookup intent and information
86
              struct nameidata *nd)   // IN: lookup intent and information
87
#endif
79
{
88
{
80
   char *filename;
89
   char *filename;
81
   struct inode *inode;
90
   struct inode *inode;
(-)a/modules/linux/vmsync/sync.c (+8 lines)
Lines 162-168 VmSyncThawDevices(void *_state) // IN Link Here
162
   cancel_delayed_work(&state->thawTask);
162
   cancel_delayed_work(&state->thawTask);
163
   list_for_each_safe(cur, tmp, &state->devices) {
163
   list_for_each_safe(cur, tmp, &state->devices) {
164
      dev = list_entry(cur, VmSyncBlockDevice, list);
164
      dev = list_entry(cur, VmSyncBlockDevice, list);
165
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
166
      if (dev->sb != NULL && dev->sb->s_writers.frozen != SB_UNFROZEN) {
167
#else
165
      if (dev->sb != NULL && dev->sb->s_frozen != SB_UNFROZEN) {
168
      if (dev->sb != NULL && dev->sb->s_frozen != SB_UNFROZEN) {
169
#endif
166
         thaw_bdev(dev->bdev, dev->sb);
170
         thaw_bdev(dev->bdev, dev->sb);
167
         atomic_dec(&gFreezeCount);
171
         atomic_dec(&gFreezeCount);
168
      }
172
      }
Lines 237-243 VmSyncAddPath(const VmSyncState *state, Link Here
237
    * the superblock is already frozen.
241
    * the superblock is already frozen.
238
    */
242
    */
239
   if (inode->i_sb->s_bdev == NULL ||
243
   if (inode->i_sb->s_bdev == NULL ||
244
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
245
       inode->i_sb->s_writers.frozen != SB_UNFROZEN) {
246
#else
240
       inode->i_sb->s_frozen != SB_UNFROZEN) {
247
       inode->i_sb->s_frozen != SB_UNFROZEN) {
248
#endif
241
      result = (inode->i_sb->s_bdev == NULL) ? -EINVAL : -EALREADY;
249
      result = (inode->i_sb->s_bdev == NULL) ? -EINVAL : -EALREADY;
242
      compat_path_release(&nd);
250
      compat_path_release(&nd);
243
      goto exit;
251
      goto exit;
(-)a/modules/linux/vmhgfs/dentry.c (+12 lines)
Lines 36-42 Link Here
36
36
37
/* HGFS dentry operations. */
37
/* HGFS dentry operations. */
38
static int HgfsDentryRevalidate(struct dentry *dentry,
38
static int HgfsDentryRevalidate(struct dentry *dentry,
39
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
40
				unsigned int flags);
41
#else
39
                                struct nameidata *nd);
42
                                struct nameidata *nd);
43
#endif
40
44
41
/* HGFS dentry operations structure. */
45
/* HGFS dentry operations structure. */
42
struct dentry_operations HgfsDentryOperations = {
46
struct dentry_operations HgfsDentryOperations = {
Lines 71-77 struct dentry_operations HgfsDentryOpera Link Here
71
75
72
static int
76
static int
73
HgfsDentryRevalidate(struct dentry *dentry,  // IN: Dentry to revalidate
77
HgfsDentryRevalidate(struct dentry *dentry,  // IN: Dentry to revalidate
78
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
79
		     unsigned int flags)
80
#else
74
                     struct nameidata *nd)   // IN: Lookup flags & intent
81
                     struct nameidata *nd)   // IN: Lookup flags & intent
82
#endif
75
{
83
{
76
   int error;
84
   int error;
77
   LOG(6, (KERN_DEBUG "VMware hgfs: HgfsDentryRevalidate: calling "
85
   LOG(6, (KERN_DEBUG "VMware hgfs: HgfsDentryRevalidate: calling "
Lines 80-86 HgfsDentryRevalidate(struct dentry *dent Link Here
80
   ASSERT(dentry);
88
   ASSERT(dentry);
81
89
82
#if defined(LOOKUP_RCU) /* Introduced in 2.6.38 */
90
#if defined(LOOKUP_RCU) /* Introduced in 2.6.38 */
91
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
92
   if (flags & LOOKUP_RCU) {
93
#else
83
   if (nd && (nd->flags & LOOKUP_RCU)) {
94
   if (nd && (nd->flags & LOOKUP_RCU)) {
95
#endif
84
      return -ECHILD;
96
      return -ECHILD;
85
   }
97
   }
86
#endif
98
#endif
(-)a/modules/linux/vmhgfs/inode.c (+24 lines)
Lines 75-84 static int HgfsPackSymlinkCreateRequest( Link Here
75
static int HgfsCreate(struct inode *dir,
75
static int HgfsCreate(struct inode *dir,
76
                      struct dentry *dentry,
76
                      struct dentry *dentry,
77
                      compat_umode_t mode,
77
                      compat_umode_t mode,
78
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
79
		      bool excl);
80
#else
78
                      struct nameidata *nd);
81
                      struct nameidata *nd);
82
#endif
79
static struct dentry *HgfsLookup(struct inode *dir,
83
static struct dentry *HgfsLookup(struct inode *dir,
80
                                 struct dentry *dentry,
84
                                 struct dentry *dentry,
85
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
86
				 unsigned int flags);
87
#else
81
                                 struct nameidata *nd);
88
                                 struct nameidata *nd);
89
#endif
82
static int HgfsMkdir(struct inode *dir,
90
static int HgfsMkdir(struct inode *dir,
83
                     struct dentry *dentry,
91
                     struct dentry *dentry,
84
                     compat_umode_t mode);
92
                     compat_umode_t mode);
Lines 952-958 static int Link Here
952
HgfsCreate(struct inode *dir,     // IN: Parent dir to create in
960
HgfsCreate(struct inode *dir,     // IN: Parent dir to create in
953
           struct dentry *dentry, // IN: Dentry containing name to create
961
           struct dentry *dentry, // IN: Dentry containing name to create
954
           compat_umode_t mode,   // IN: Mode of file to be created
962
           compat_umode_t mode,   // IN: Mode of file to be created
963
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
964
	   bool excl)
965
#else
955
	   struct nameidata *nd)  // IN: Intent, vfsmount, ...
966
	   struct nameidata *nd)  // IN: Intent, vfsmount, ...
967
#endif
956
{
968
{
957
   HgfsAttrInfo attr;
969
   HgfsAttrInfo attr;
958
   int result;
970
   int result;
Lines 1025-1031 HgfsCreate(struct inode *dir, // IN: Link Here
1025
static struct dentry *
1037
static struct dentry *
1026
HgfsLookup(struct inode *dir,      // IN: Inode of parent directory
1038
HgfsLookup(struct inode *dir,      // IN: Inode of parent directory
1027
           struct dentry *dentry,  // IN: Dentry containing name to look up
1039
           struct dentry *dentry,  // IN: Dentry containing name to look up
1040
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
1041
	   unsigned int flags)
1042
#else
1028
           struct nameidata *nd)   // IN: Intent, vfsmount, ...
1043
           struct nameidata *nd)   // IN: Intent, vfsmount, ...
1044
#endif
1029
{
1045
{
1030
   HgfsAttrInfo attr;
1046
   HgfsAttrInfo attr;
1031
   struct inode *inode;
1047
   struct inode *inode;
Lines 1801-1807 HgfsPermission(struct inode *inode, Link Here
1801
#else
1817
#else
1802
   if (mask & MAY_ACCESS) { /* For sys_access. */
1818
   if (mask & MAY_ACCESS) { /* For sys_access. */
1803
#endif
1819
#endif
1820
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
1821
      struct hlist_node *p;
1822
#else
1804
      struct list_head *pos;
1823
      struct list_head *pos;
1824
#endif
1805
      int dcount = 0;
1825
      int dcount = 0;
1806
      struct dentry *dentry = NULL;
1826
      struct dentry *dentry = NULL;
1807
1827
Lines 1817-1824 HgfsPermission(struct inode *inode, Link Here
1817
#endif
1837
#endif
1818
1838
1819
      /* Find a dentry with valid d_count. Refer bug 587789. */
1839
      /* Find a dentry with valid d_count. Refer bug 587789. */
1840
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
1841
      hlist_for_each_entry(dentry, p, &inode->i_dentry, d_alias) {
1842
#else
1820
      list_for_each(pos, &inode->i_dentry) {
1843
      list_for_each(pos, &inode->i_dentry) {
1821
         dentry = list_entry(pos, struct dentry, d_alias);
1844
         dentry = list_entry(pos, struct dentry, d_alias);
1845
#endif
1822
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38)
1846
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38)
1823
         dcount = atomic_read(&dentry->d_count);
1847
         dcount = atomic_read(&dentry->d_count);
1824
#else
1848
#else
(-)a/modules/linux/vmhgfs/page.c (+8 lines)
Lines 893-899 HgfsDoWriteBegin(struct page *page, Link Here
893
    */
893
    */
894
   if ((offset >= currentFileSize) ||
894
   if ((offset >= currentFileSize) ||
895
       ((pageFrom == 0) && (offset + pageTo) >= currentFileSize)) {
895
       ((pageFrom == 0) && (offset + pageTo) >= currentFileSize)) {
896
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
897
      void *kaddr = kmap_atomic(page);
898
#else
896
      void *kaddr = kmap_atomic(page, KM_USER0);
899
      void *kaddr = kmap_atomic(page, KM_USER0);
900
#endif
897
901
898
      if (pageFrom) {
902
      if (pageFrom) {
899
         memset(kaddr, 0, pageFrom);
903
         memset(kaddr, 0, pageFrom);
Lines 901-907 HgfsDoWriteBegin(struct page *page, Link Here
901
      if (pageTo < PAGE_CACHE_SIZE) {
905
      if (pageTo < PAGE_CACHE_SIZE) {
902
         memset(kaddr + pageTo, 0, PAGE_CACHE_SIZE - pageTo);
906
         memset(kaddr + pageTo, 0, PAGE_CACHE_SIZE - pageTo);
903
      }
907
      }
908
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
909
      kunmap_atomic(kaddr);
910
#else
904
      kunmap_atomic(kaddr, KM_USER0);
911
      kunmap_atomic(kaddr, KM_USER0);
912
#endif
905
      flush_dcache_page(page);
913
      flush_dcache_page(page);
906
   }
914
   }
907
}
915
}

Return to bug 438110