summaryrefslogtreecommitdiffstats
path: root/kernel/relay.c
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2008-03-26 12:01:28 +0100
committerJens Axboe <jens.axboe@oracle.com>2008-03-26 12:01:28 +0100
commit37529fe9f62835e1c11895a1895064748b032dc1 (patch)
tree961853665601ae08f85008cae589798bdf8f940d /kernel/relay.c
parent05dda977f2574c3341abef9b74c27d2b362e1e3a (diff)
downloadlinux-37529fe9f62835e1c11895a1895064748b032dc1.tar.bz2
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 <laijs@cn.fujitsu.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'kernel/relay.c')
-rw-r--r--kernel/relay.c2
1 files changed, 1 insertions, 1 deletions
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);
}
/**