aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorChris Wright <chrisw@sous-sol.org>2010-05-12 21:28:57 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-21 12:37:31 -0400
commit2c3c8bea608866d8bd9dcf92657d57fdcac011c5 (patch)
treef509b958d0a65c46c831dbdd447a81e706dd995a /drivers/s390/cio
parent68d75ed4b84a0806ecd4bc14da4759713b23a532 (diff)
sysfs: add struct file* to bin_attr callbacks
This allows bin_attr->read,write,mmap callbacks to check file specific data (such as inode owner) as part of any privilege validation. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/chp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c
index 1d16189f2f2d..6c9fa15aac7b 100644
--- a/drivers/s390/cio/chp.c
+++ b/drivers/s390/cio/chp.c
@@ -135,7 +135,8 @@ static int s390_vary_chpid(struct chp_id chpid, int on)
135/* 135/*
136 * Channel measurement related functions 136 * Channel measurement related functions
137 */ 137 */
138static ssize_t chp_measurement_chars_read(struct kobject *kobj, 138static ssize_t chp_measurement_chars_read(struct file *filp,
139 struct kobject *kobj,
139 struct bin_attribute *bin_attr, 140 struct bin_attribute *bin_attr,
140 char *buf, loff_t off, size_t count) 141 char *buf, loff_t off, size_t count)
141{ 142{
@@ -182,7 +183,7 @@ static void chp_measurement_copy_block(struct cmg_entry *buf,
182 } while (reference_buf.values[0] != buf->values[0]); 183 } while (reference_buf.values[0] != buf->values[0]);
183} 184}
184 185
185static ssize_t chp_measurement_read(struct kobject *kobj, 186static ssize_t chp_measurement_read(struct file *filp, struct kobject *kobj,
186 struct bin_attribute *bin_attr, 187 struct bin_attribute *bin_attr,
187 char *buf, loff_t off, size_t count) 188 char *buf, loff_t off, size_t count)
188{ 189{