aboutsummaryrefslogtreecommitdiff
path: root/driver/gator_fs.c
diff options
context:
space:
mode:
authorDrew Richardson <drew.richardson@arm.com>2011-05-23 12:00:00 -0700
committerDrew Richardson <drew.richardson@arm.com>2014-12-19 15:07:51 -0800
commit538231c5bf600e61a4ac4f7a25e6ba2c61ad68ee (patch)
treee8fb7472b0e69acb2ca768c3571bad169c14304b /driver/gator_fs.c
parenta3a50f5d7331c6294a81039d1eae731ed5682521 (diff)
gator: Version 5.55.5
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Diffstat (limited to 'driver/gator_fs.c')
-rw-r--r--driver/gator_fs.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/driver/gator_fs.c b/driver/gator_fs.c
index 5f8983f..f7cbff2 100644
--- a/driver/gator_fs.c
+++ b/driver/gator_fs.c
@@ -27,6 +27,9 @@ static struct inode *gatorfs_get_inode(struct super_block *sb, int mode)
struct inode *inode = new_inode(sb);
if (inode) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
+ inode->i_ino = get_next_ino();
+#endif
inode->i_mode = mode;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
}
@@ -246,16 +249,29 @@ static int gatorfs_fill_super(struct super_block *sb, void *data, int silent)
return 0;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
static int gatorfs_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
{
return get_sb_single(fs_type, flags, data, gatorfs_fill_super, mnt);
}
+#else
+static struct dentry *gatorfs_mount(struct file_system_type *fs_type,
+ int flags, const char *dev_name, void *data)
+{
+ return mount_nodev(fs_type, flags, data, gatorfs_fill_super);
+}
+#endif
static struct file_system_type gatorfs_type = {
.owner = THIS_MODULE,
.name = "gatorfs",
- .get_sb = gatorfs_get_sb,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
+ .get_sb = gatorfs_get_sb,
+#else
+ .mount = gatorfs_mount,
+#endif
+
.kill_sb = kill_litter_super,
};