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 |
*----------------------------------------------------------------------------- |