Lines 46-52
Link Here
|
46 |
|
46 |
|
47 |
static struct proc_dir_entry *controlProcDirEntry; |
47 |
static struct proc_dir_entry *controlProcDirEntry; |
48 |
struct file_operations ControlFileOps = { |
48 |
struct file_operations ControlFileOps = { |
|
|
49 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) |
49 |
.owner = THIS_MODULE, |
50 |
.owner = THIS_MODULE, |
|
|
51 |
#endif |
50 |
.write = ControlFileOpWrite, |
52 |
.write = ControlFileOpWrite, |
51 |
.release = ControlFileOpRelease, |
53 |
.release = ControlFileOpRelease, |
52 |
}; |
54 |
}; |
Lines 156-162
Link Here
|
156 |
return -EINVAL; |
158 |
return -EINVAL; |
157 |
} |
159 |
} |
158 |
|
160 |
|
|
|
161 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) |
159 |
controlProcDirEntry->owner = THIS_MODULE; |
162 |
controlProcDirEntry->owner = THIS_MODULE; |
|
|
163 |
#endif |
160 |
|
164 |
|
161 |
/* Create /proc/fs/vmblock/mountPoint */ |
165 |
/* Create /proc/fs/vmblock/mountPoint */ |
162 |
controlProcMountpoint = proc_mkdir(VMBLOCK_CONTROL_MOUNTPOINT, |
166 |
controlProcMountpoint = proc_mkdir(VMBLOCK_CONTROL_MOUNTPOINT, |
Lines 168-174
Link Here
|
168 |
return -EINVAL; |
172 |
return -EINVAL; |
169 |
} |
173 |
} |
170 |
|
174 |
|
|
|
175 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) |
171 |
controlProcMountpoint->owner = THIS_MODULE; |
176 |
controlProcMountpoint->owner = THIS_MODULE; |
|
|
177 |
#endif |
172 |
|
178 |
|
173 |
/* Create /proc/fs/vmblock/dev */ |
179 |
/* Create /proc/fs/vmblock/dev */ |
174 |
controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME, |
180 |
controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME, |