]> CyberLeo.Net >> Repos - CDN/portage-cdn.git/blob - app-emulation/vmware-modules/files/patches/vmblock/010_all_kernel-2.6.25.patch
Initial import
[CDN/portage-cdn.git] / app-emulation / vmware-modules / files / patches / vmblock / 010_all_kernel-2.6.25.patch
1 diff --git a/linux/dentry.c b/linux/dentry.c
2 index a39bb76..07c6296 100644
3 --- a/linux/dentry.c
4 +++ b/linux/dentry.c
5 @@ -112,7 +112,7 @@ DentryOpRevalidate(struct dentry *dentry,  // IN: dentry revalidating
6        LOG(4, "DentryOpRevalidate: [%s] no longer exists\n", iinfo->name);
7        return 0;
8     }
9 -   ret = actualNd.dentry && actualNd.dentry->d_inode;
10 +   ret = nd_dentry(&actualNd) && nd_dentry(&actualNd)->d_inode;
11     path_release(&actualNd);
12  
13     LOG(8, "DentryOpRevalidate: [%s] %s revalidated\n",
14 diff --git a/linux/filesystem.c b/linux/filesystem.c
15 index fb6d0bf..e979072 100644
16 --- a/linux/filesystem.c
17 +++ b/linux/filesystem.c
18 @@ -273,7 +273,7 @@ Iget(struct super_block *sb,    // IN: file system superblock object
19
20     ASSERT(sb);
21
22 -   inode = iget(sb, ino);
23 +   inode = iget_locked(sb, ino);
24     if (!inode) {
25        return NULL;
26     }
27 @@ -301,7 +301,7 @@ Iget(struct super_block *sb,    // IN: file system superblock object
28        return inode;
29     }
30  
31 -   iinfo->actualDentry = actualNd.dentry;
32 +   iinfo->actualDentry = nd_dentry(&actualNd);
33     path_release(&actualNd);
34  
35     return inode;
36 @@ -307,7 +307,7 @@ Iget(struct super_block *sb,    // IN: file system superblock object
37     return inode;
38
39  error_inode:
40 -   iput(inode);
41 +   iget_failed(inode);
42     return NULL;
43  }
44
45 diff --git a/linux/filesystem.h b/linux/filesystem.h
46 index 697d112..0f5f32f 100644
47 --- a/linux/filesystem.h
48 +++ b/linux/filesystem.h
49 @@ -51,6 +51,27 @@
50  
51  #include "vm_basic_types.h"
52  
53 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 24)
54 +#define nd_dentry(nd)  (nd)->path.dentry
55 +#define nd_mnt(nd)     (nd)->path.mnt
56 +
57 +static inline void path_release(struct nameidata *nd)
58 +{
59 +       path_put(&nd->path);
60 +}
61 +
62 +#else
63 +#define nd_dentry(nd)  (nd)->dentry
64 +#define nd_mnt(nd)     (nd)->mnt
65 +
66 +static inline void iget_failed(struct inode *inode)
67 +{
68 +       make_bad_inode(inode);
69 +       unlock_new_inode(inode);
70 +       iput(inode);
71 +}
72 +#endif
73 +
74  #ifndef container_of
75  #define container_of(ptr, type, memb)   ((type *)((char *)(ptr) - offsetof(type, memb)))
76  #endif
77 diff --git a/linux/super.c b/linux/super.c
78 index 2f2a9aa..697917d 100644
79 --- a/linux/super.c
80 +++ b/linux/super.c
81 @@ -52,7 +52,7 @@ struct super_operations VMBlockSuperOps = {
82  #else
83     .clear_inode   = SuperOpClearInode,
84  #endif
85 -   .read_inode    = SuperOpReadInode,
86 +//   .read_inode    = SuperOpReadInode,
87     .statfs        = SuperOpStatfs,
88  };
89