From 37529fe9f62835e1c11895a1895064748b032dc1 Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Wed, 26 Mar 2008 12:01:28 +0100 Subject: 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 --- kernel/relay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel/relay.c') diff --git a/kernel/relay.c b/kernel/relay.c index 4c035a8a248..ed3f6cf2db8 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); } /** -- cgit v1.2.3-18-g5258