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

Collapse All | Expand All

(-)source-original/vmblock-only/linux/dentry.c (-2 / +5 lines)
Lines 103-110 Link Here
103
       actualDentry->d_op->d_revalidate) {
103
       actualDentry->d_op->d_revalidate) {
104
      return actualDentry->d_op->d_revalidate(actualDentry, nd);
104
      return actualDentry->d_op->d_revalidate(actualDentry, nd);
105
   }
105
   }
106
106
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
107
   if (path_lookup(iinfo->name, 0, &actualNd)) {
107
   if (kern_path(iinfo->name, 0, &actualNd)) {
108
#else
109
   if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
110
#endif
108
      LOG(4, "DentryOpRevalidate: [%s] no longer exists\n", iinfo->name);
111
      LOG(4, "DentryOpRevalidate: [%s] no longer exists\n", iinfo->name);
109
      return 0;
112
      return 0;
110
   }
113
   }
(-)source-original/vmblock-only/linux/filesystem.c (-4 / +26 lines)
Lines 44-51 Link Here
44
/* File system operations */
44
/* File system operations */
45
45
46
#if defined(VMW_GETSB_2618)
46
#if defined(VMW_GETSB_2618)
47
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
48
static struct dentry *FsOpMount(struct file_system_type *fsType, int flags,
49
                     const char *devName, void *rawData);
50
#else
47
static int FsOpGetSb(struct file_system_type *fsType, int flags,
51
static int FsOpGetSb(struct file_system_type *fsType, int flags,
48
                     const char *devName, void *rawData, struct vfsmount *mnt);
52
                     const char *devName, void *rawData, struct vfsmount *mnt);
53
#endif
49
#else
54
#else
50
static struct super_block *FsOpGetSb(struct file_system_type *fsType, int flags,
55
static struct super_block *FsOpGetSb(struct file_system_type *fsType, int flags,
51
                                     const char *devName, void *rawData);
56
                                     const char *devName, void *rawData);
Lines 66-72 Link Here
66
static struct file_system_type fsType = {
71
static struct file_system_type fsType = {
67
   .owner = THIS_MODULE,
72
   .owner = THIS_MODULE,
68
   .name = VMBLOCK_FS_NAME,
73
   .name = VMBLOCK_FS_NAME,
74
   #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
75
   .mount = FsOpMount,
76
   #else
69
   .get_sb = FsOpGetSb,
77
   .get_sb = FsOpGetSb,
78
   #endif
70
   .kill_sb = kill_anon_super,
79
   .kill_sb = kill_anon_super,
71
};
80
};
72
81
Lines 335-342 Link Here
335
      Warning("Iget: could not make full name\n");
344
      Warning("Iget: could not make full name\n");
336
      goto error_inode;
345
      goto error_inode;
337
   }
346
   }
338
347
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
348
   if (kern_path(iinfo->name, 0, &actualNd)) {
349
#else
339
   if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
350
   if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
351
#endif
340
      /*
352
      /*
341
       * This file does not exist, so we create an inode that doesn't know
353
       * This file does not exist, so we create an inode that doesn't know
342
       * about its underlying file.  Operations that create files and
354
       * about its underlying file.  Operations that create files and
Lines 533-550 Link Here
533
   return 0;
545
   return 0;
534
}
546
}
535
547
536
537
#if defined(VMW_GETSB_2618)
548
#if defined(VMW_GETSB_2618)
538
/*
549
/*
539
 *-----------------------------------------------------------------------------
550
 *-----------------------------------------------------------------------------
540
 *
551
 *
541
 * FsOpGetSb --
552
 * FsOpGetSb/FsOpMount --
542
 *
553
 *
543
 *    Invokes generic kernel code to prepare superblock for
554
 *    Invokes generic kernel code to prepare superblock for
544
 *    deviceless filesystem.
555
 *    deviceless filesystem.
545
 *
556
 *
546
 * Results:
557
 * Results:
547
 *    0 on success
558
 *    0/dentry on success
548
 *    negative error code on failure
559
 *    negative error code on failure
549
 *
560
 *
550
 * Side effects:
561
 * Side effects:
Lines 552-558 Link Here
552
 *
563
 *
553
 *-----------------------------------------------------------------------------
564
 *-----------------------------------------------------------------------------
554
 */
565
 */
566
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
567
struct dentry *
568
FsOpMount(struct file_system_type *fs_type, // IN: file system type of mount
569
          int flags,                        // IN: mount flags
570
          const char *dev_name,             // IN: device mounting on
571
          void *rawData)                    // IN: mount arguments
572
{
573
   return mount_nodev(fs_type, flags, rawData, FsOpReadSuper);
574
}
555
575
576
#else
556
static int
577
static int
557
FsOpGetSb(struct file_system_type *fs_type, // IN: file system type of mount
578
FsOpGetSb(struct file_system_type *fs_type, // IN: file system type of mount
558
          int flags,                        // IN: mount flags
579
          int flags,                        // IN: mount flags
Lines 562-567 Link Here
562
{
583
{
563
   return get_sb_nodev(fs_type, flags, rawData, FsOpReadSuper, mnt);
584
   return get_sb_nodev(fs_type, flags, rawData, FsOpReadSuper, mnt);
564
}
585
}
586
#endif
565
#else
587
#else
566
/*
588
/*
567
 *-----------------------------------------------------------------------------
589
 *-----------------------------------------------------------------------------
(-)source-original/vmblock-only/linux/module.c (-1 lines)
Lines 78-84 Link Here
78
VMBlockInit(void)
78
VMBlockInit(void)
79
{
79
{
80
   int ret;
80
   int ret;
81
82
   ret = VMBlockInitControlOps();
81
   ret = VMBlockInitControlOps();
83
   if (ret < 0) {
82
   if (ret < 0) {
84
      goto error;
83
      goto error;
(-)source-original/vmci-only/linux/driver.c (-1 lines)
Lines 42-48 Link Here
42
#include <linux/miscdevice.h>
42
#include <linux/miscdevice.h>
43
#include <linux/poll.h>
43
#include <linux/poll.h>
44
#include <linux/smp.h>
44
#include <linux/smp.h>
45
#include <linux/smp_lock.h>
46
45
47
#include "compat_file.h"
46
#include "compat_file.h"
48
#include "compat_highmem.h"
47
#include "compat_highmem.h"
(-)source-original/vmmon-only/linux/driver.c (-2 / +3 lines)
Lines 780-786 Link Here
780
780
781
781
782
#define POLLQUEUE_MAX_TASK 1000
782
#define POLLQUEUE_MAX_TASK 1000
783
static spinlock_t pollQueueLock __attribute__((unused)) = SPIN_LOCK_UNLOCKED;
783
static DEFINE_SPINLOCK(pollQueueLock);
784
static void *pollQueue[POLLQUEUE_MAX_TASK];
784
static void *pollQueue[POLLQUEUE_MAX_TASK];
785
static unsigned int pollQueueCount = 0;
785
static unsigned int pollQueueCount = 0;
786
786
Lines 1041-1047 Link Here
1041
		* but unfortunately there is no way how to detect that
1041
		* but unfortunately there is no way how to detect that
1042
		* we are building for RedHat's kernel...
1042
		* we are building for RedHat's kernel...
1043
		*/
1043
		*/
1044
	       static spinlock_t timerLock = SPIN_LOCK_UNLOCKED;
1044
1045
	       static DEFINE_SPINLOCK(timerLock);
1045
1046
1046
	       spin_lock(&timerLock);
1047
	       spin_lock(&timerLock);
1047
	       mod_timer(&linuxState.pollTimer, jiffies + 1);
1048
	       mod_timer(&linuxState.pollTimer, jiffies + 1);
(-)source-original/vmmon-only/linux/hostif.c (-1 lines)
Lines 46-52 Link Here
46
#include <linux/mman.h>
46
#include <linux/mman.h>
47
47
48
#include <linux/smp.h>
48
#include <linux/smp.h>
49
#include <linux/smp_lock.h>
50
49
51
#include <asm/io.h>
50
#include <asm/io.h>
52
#include <linux/mc146818rtc.h>
51
#include <linux/mc146818rtc.h>
(-)source-original/vmmon-only/linux/iommu.c (-1 / +1 lines)
Lines 44-50 Link Here
44
44
45
45
46
static LIST_HEAD(passthruDeviceList);
46
static LIST_HEAD(passthruDeviceList);
47
static spinlock_t passthruDeviceListLock = SPIN_LOCK_UNLOCKED;
47
static DEFINE_SPINLOCK(passthruDeviceListLock);
48
static void *pciHolePage = NULL;
48
static void *pciHolePage = NULL;
49
49
50
/*
50
/*
(-)source-original/vmnet-only/driver.c (-6 / +6 lines)
Lines 28-34 Link Here
28
#include <linux/poll.h>
28
#include <linux/poll.h>
29
29
30
#include <linux/smp.h>
30
#include <linux/smp.h>
31
#include <linux/smp_lock.h>
32
31
33
#include <linux/netdevice.h>
32
#include <linux/netdevice.h>
34
#include <linux/etherdevice.h>
33
#include <linux/etherdevice.h>
Lines 105-111 Link Here
105
 * not have vnetStructureMutex already acquired,
104
 * not have vnetStructureMutex already acquired,
106
 * it is most certainly a bug.
105
 * it is most certainly a bug.
107
 */
106
 */
108
static rwlock_t vnetPeerLock = RW_LOCK_UNLOCKED;
107
static DEFINE_RWLOCK(vnetPeerLock);
109
108
110
/*
109
/*
111
 * All concurrent changes to the network structure are
110
 * All concurrent changes to the network structure are
Lines 115-120 Link Here
115
 * vnetStructureMutex and vnetPeerLock for write.
114
 * vnetStructureMutex and vnetPeerLock for write.
116
 */
115
 */
117
compat_define_mutex(vnetStructureMutex);
116
compat_define_mutex(vnetStructureMutex);
117
compat_define_mutex(vnetMutex);
118
118
119
#if defined(VM_X86_64) && !defined(HAVE_COMPAT_IOCTL)
119
#if defined(VM_X86_64) && !defined(HAVE_COMPAT_IOCTL)
120
/*
120
/*
Lines 264-274 Link Here
264
			    struct file * filp)  // IN:
264
			    struct file * filp)  // IN:
265
{
265
{
266
   int ret = -ENOTTY;
266
   int ret = -ENOTTY;
267
   lock_kernel();
267
   compat_mutex_lock(&vnetMutex);
268
   if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {
268
   if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {
269
      ret = VNetFileOpIoctl(filp->f_dentry->d_inode, filp, iocmd, ioarg);
269
      ret = VNetFileOpIoctl(filp->f_dentry->d_inode, filp, iocmd, ioarg);
270
   }
270
   }
271
   unlock_kernel();
271
   compat_mutex_unlock(&vnetMutex);
272
   return ret;
272
   return ret;
273
}
273
}
274
274
Lines 1134-1142 Link Here
1134
   if (filp && filp->f_dentry) {
1134
   if (filp && filp->f_dentry) {
1135
      inode = filp->f_dentry->d_inode;
1135
      inode = filp->f_dentry->d_inode;
1136
   }
1136
   }
1137
   lock_kernel();
1137
   compat_mutex_lock(&vnetMutex);
1138
   err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
1138
   err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
1139
   unlock_kernel();
1139
   compat_mutex_unlock(&vnetMutex);
1140
   return err;
1140
   return err;
1141
}
1141
}
1142
#endif
1142
#endif
(-)source-original/vmnet-only/filter.c (-1 / +1 lines)
Lines 85-91 Link Here
85
 * callbacks can be concurrently executing on multiple threads on multiple
85
 * callbacks can be concurrently executing on multiple threads on multiple
86
 * CPUs, so we should revisit locking for allowing for that in the future.
86
 * CPUs, so we should revisit locking for allowing for that in the future.
87
 */
87
 */
88
spinlock_t activeRuleLock = SPIN_LOCK_UNLOCKED;
88
DEFINE_SPINLOCK(activeRuleLock);
89
89
90
/*
90
/*
91
 * Logging.
91
 * Logging.
(-)source-original/vmnet-only/hub.c (-1 / +1 lines)
Lines 81-87 Link Here
81
 * so we use __attribute__((unused)) to quiet the compiler.
81
 * so we use __attribute__((unused)) to quiet the compiler.
82
 */
82
 */
83
83
84
static spinlock_t vnetHubLock __attribute__((unused)) = SPIN_LOCK_UNLOCKED;
84
static DEFINE_SPINLOCK(vnetHubLock);
85
85
86
86
87
/*
87
/*
(-)source-original/vsock-only/linux/af_vsock.c (-1 lines)
Lines 102-108 Link Here
102
#include <linux/miscdevice.h>
102
#include <linux/miscdevice.h>
103
#include <linux/poll.h>
103
#include <linux/poll.h>
104
#include <linux/smp.h>
104
#include <linux/smp.h>
105
#include <linux/smp_lock.h>
106
#include <asm/io.h>
105
#include <asm/io.h>
107
#if defined(__x86_64__) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
106
#if defined(__x86_64__) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
108
#   if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
107
#   if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
(-)source-original/vsock-only/linux/util.c (-1 / +1 lines)
Lines 34-40 Link Here
34
struct list_head vsockBindTable[VSOCK_HASH_SIZE + 1];
34
struct list_head vsockBindTable[VSOCK_HASH_SIZE + 1];
35
struct list_head vsockConnectedTable[VSOCK_HASH_SIZE];
35
struct list_head vsockConnectedTable[VSOCK_HASH_SIZE];
36
36
37
spinlock_t vsockTableLock = SPIN_LOCK_UNLOCKED;
37
DEFINE_SPINLOCK(vsockTableLock);
38
38
39
/*
39
/*
40
 * snprintf() wasn't exported until 2.4.10: fall back on sprintf in those
40
 * snprintf() wasn't exported until 2.4.10: fall back on sprintf in those

Return to bug 368139