1 |
ikelos 08/04/26 14:39:16 |
2 |
|
3 |
Added: 010_all_kernel-2.6.25.patch |
4 |
Log: |
5 |
Add patches for -r1 ebuilds to ensure they work on 2.6.25 and older kernels. |
6 |
(Portage version: 2.1.5_rc6) |
7 |
(Signed Manifest commit) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-emulation/vmware-modules/files/patches/vmblock/010_all_kernel-2.6.25.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/vmware-modules/files/patches/vmblock/010_all_kernel-2.6.25.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/vmware-modules/files/patches/vmblock/010_all_kernel-2.6.25.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: 010_all_kernel-2.6.25.patch |
16 |
=================================================================== |
17 |
diff --git a/linux/dentry.c b/linux/dentry.c |
18 |
index a39bb76..07c6296 100644 |
19 |
--- a/linux/dentry.c |
20 |
+++ b/linux/dentry.c |
21 |
@@ -112,7 +112,7 @@ DentryOpRevalidate(struct dentry *dentry, // IN: dentry revalidating |
22 |
LOG(4, "DentryOpRevalidate: [%s] no longer exists\n", iinfo->name); |
23 |
return 0; |
24 |
} |
25 |
- ret = actualNd.dentry && actualNd.dentry->d_inode; |
26 |
+ ret = nd_dentry(&actualNd) && nd_dentry(&actualNd)->d_inode; |
27 |
path_release(&actualNd); |
28 |
|
29 |
LOG(8, "DentryOpRevalidate: [%s] %s revalidated\n", |
30 |
diff --git a/linux/filesystem.c b/linux/filesystem.c |
31 |
index fb6d0bf..e979072 100644 |
32 |
--- a/linux/filesystem.c |
33 |
+++ b/linux/filesystem.c |
34 |
@@ -273,7 +273,7 @@ Iget(struct super_block *sb, // IN: file system superblock object |
35 |
|
36 |
ASSERT(sb); |
37 |
|
38 |
- inode = iget(sb, ino); |
39 |
+ inode = iget_locked(sb, ino); |
40 |
if (!inode) { |
41 |
return NULL; |
42 |
} |
43 |
@@ -301,7 +301,7 @@ Iget(struct super_block *sb, // IN: file system superblock object |
44 |
return inode; |
45 |
} |
46 |
|
47 |
- iinfo->actualDentry = actualNd.dentry; |
48 |
+ iinfo->actualDentry = nd_dentry(&actualNd); |
49 |
path_release(&actualNd); |
50 |
|
51 |
return inode; |
52 |
@@ -307,7 +307,7 @@ Iget(struct super_block *sb, // IN: file system superblock object |
53 |
return inode; |
54 |
|
55 |
error_inode: |
56 |
- iput(inode); |
57 |
+ iget_failed(inode); |
58 |
return NULL; |
59 |
} |
60 |
|
61 |
diff --git a/linux/filesystem.h b/linux/filesystem.h |
62 |
index 697d112..0f5f32f 100644 |
63 |
--- a/linux/filesystem.h |
64 |
+++ b/linux/filesystem.h |
65 |
@@ -51,6 +51,27 @@ |
66 |
|
67 |
#include "vm_basic_types.h" |
68 |
|
69 |
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 24) |
70 |
+#define nd_dentry(nd) (nd)->path.dentry |
71 |
+#define nd_mnt(nd) (nd)->path.mnt |
72 |
+ |
73 |
+static inline void path_release(struct nameidata *nd) |
74 |
+{ |
75 |
+ path_put(&nd->path); |
76 |
+} |
77 |
+ |
78 |
+#else |
79 |
+#define nd_dentry(nd) (nd)->dentry |
80 |
+#define nd_mnt(nd) (nd)->mnt |
81 |
+ |
82 |
+static inline void iget_failed(struct inode *inode) |
83 |
+{ |
84 |
+ make_bad_inode(inode); |
85 |
+ unlock_new_inode(inode); |
86 |
+ iput(inode); |
87 |
+} |
88 |
+#endif |
89 |
+ |
90 |
#ifndef container_of |
91 |
#define container_of(ptr, type, memb) ((type *)((char *)(ptr) - offsetof(type, memb))) |
92 |
#endif |
93 |
diff --git a/linux/super.c b/linux/super.c |
94 |
index 2f2a9aa..697917d 100644 |
95 |
--- a/linux/super.c |
96 |
+++ b/linux/super.c |
97 |
@@ -52,7 +52,7 @@ struct super_operations VMBlockSuperOps = { |
98 |
#else |
99 |
.clear_inode = SuperOpClearInode, |
100 |
#endif |
101 |
- .read_inode = SuperOpReadInode, |
102 |
+// .read_inode = SuperOpReadInode, |
103 |
.statfs = SuperOpStatfs, |
104 |
}; |
105 |
|
106 |
|
107 |
|
108 |
|
109 |
-- |
110 |
gentoo-commits@l.g.o mailing list |