diff options
Diffstat (limited to 'security/inode.c')
-rw-r--r-- | security/inode.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/security/inode.c b/security/inode.c index 8c777f022ad1..c4df2fbebe6b 100644 --- a/security/inode.c +++ b/security/inode.c | |||
@@ -53,6 +53,7 @@ static const struct file_operations default_file_ops = { | |||
53 | .read = default_read_file, | 53 | .read = default_read_file, |
54 | .write = default_write_file, | 54 | .write = default_write_file, |
55 | .open = default_open, | 55 | .open = default_open, |
56 | .llseek = noop_llseek, | ||
56 | }; | 57 | }; |
57 | 58 | ||
58 | static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev) | 59 | static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev) |
@@ -60,6 +61,7 @@ static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev) | |||
60 | struct inode *inode = new_inode(sb); | 61 | struct inode *inode = new_inode(sb); |
61 | 62 | ||
62 | if (inode) { | 63 | if (inode) { |
64 | inode->i_ino = get_next_ino(); | ||
63 | inode->i_mode = mode; | 65 | inode->i_mode = mode; |
64 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 66 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
65 | switch (mode & S_IFMT) { | 67 | switch (mode & S_IFMT) { |
@@ -129,17 +131,17 @@ static int fill_super(struct super_block *sb, void *data, int silent) | |||
129 | return simple_fill_super(sb, SECURITYFS_MAGIC, files); | 131 | return simple_fill_super(sb, SECURITYFS_MAGIC, files); |
130 | } | 132 | } |
131 | 133 | ||
132 | static int get_sb(struct file_system_type *fs_type, | 134 | static struct dentry *get_sb(struct file_system_type *fs_type, |
133 | int flags, const char *dev_name, | 135 | int flags, const char *dev_name, |
134 | void *data, struct vfsmount *mnt) | 136 | void *data) |
135 | { | 137 | { |
136 | return get_sb_single(fs_type, flags, data, fill_super, mnt); | 138 | return mount_single(fs_type, flags, data, fill_super); |
137 | } | 139 | } |
138 | 140 | ||
139 | static struct file_system_type fs_type = { | 141 | static struct file_system_type fs_type = { |
140 | .owner = THIS_MODULE, | 142 | .owner = THIS_MODULE, |
141 | .name = "securityfs", | 143 | .name = "securityfs", |
142 | .get_sb = get_sb, | 144 | .mount = get_sb, |
143 | .kill_sb = kill_litter_super, | 145 | .kill_sb = kill_litter_super, |
144 | }; | 146 | }; |
145 | 147 | ||