From: Lai Jiangshan Date: Wed, 26 Mar 2008 11:01:28 +0000 (+0100) Subject: set relay file can not be read by pread(2) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=37529fe9f62835e1c11895a1895064748b032dc1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git set relay file can not be read by pread(2) I found that relay files can be read by pread(2). I fix it, for relay files are not capable of seeking. Signed-off-by: Lai Jiangshan Signed-off-by: Jens Axboe --- diff --git a/kernel/relay.c b/kernel/relay.c index 4c035a8a248c..ed3f6cf2db86 100644 --- a/kernel/relay.c +++ b/kernel/relay.c @@ -736,7 +736,7 @@ static int relay_file_open(struct inode *inode, struct file *filp) kref_get(&buf->kref); filp->private_data = buf; - return 0; + return nonseekable_open(inode, filp); } /**