ima: use generic_file_llseek for securityfs
authorArnd Bergmann <arnd@arndb.de>
Wed, 7 Jul 2010 21:40:15 +0000 (23:40 +0200)
committerJames Morris <jmorris@namei.org>
Mon, 2 Aug 2010 05:34:58 +0000 (15:34 +1000)
The default for llseek will change to no_llseek,
so securityfs users need to add explicit .llseek
assignments. Since we're dealing with regular
files from a VFS perspective, use generic_file_llseek.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
security/integrity/ima/ima_fs.c

index 8fe736aabe71264d3018f35a1a3c7d64806411bb..ef21b96a0b4231638c4d932747174bbda2b73309 100644 (file)
@@ -45,7 +45,8 @@ static ssize_t ima_show_htable_violations(struct file *filp,
 }
 
 static const struct file_operations ima_htable_violations_ops = {
-       .read = ima_show_htable_violations
+       .read = ima_show_htable_violations,
+       .llseek = generic_file_llseek,
 };
 
 static ssize_t ima_show_measurements_count(struct file *filp,
@@ -57,7 +58,8 @@ static ssize_t ima_show_measurements_count(struct file *filp,
 }
 
 static const struct file_operations ima_measurements_count_ops = {
-       .read = ima_show_measurements_count
+       .read = ima_show_measurements_count,
+       .llseek = generic_file_llseek,
 };
 
 /* returns pointer to hlist_node */
@@ -319,7 +321,8 @@ static int ima_release_policy(struct inode *inode, struct file *file)
 static const struct file_operations ima_measure_policy_ops = {
        .open = ima_open_policy,
        .write = ima_write_policy,
-       .release = ima_release_policy
+       .release = ima_release_policy,
+       .llseek = generic_file_llseek,
 };
 
 int __init ima_fs_init(void)