diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2008-03-26 07:01:28 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-03-26 07:01:28 -0400 |
commit | 37529fe9f62835e1c11895a1895064748b032dc1 (patch) | |
tree | 961853665601ae08f85008cae589798bdf8f940d /kernel/relay.c | |
parent | 05dda977f2574c3341abef9b74c27d2b362e1e3a (diff) |
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.c | 2 |
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) | |||
736 | kref_get(&buf->kref); | 736 | kref_get(&buf->kref); |
737 | filp->private_data = buf; | 737 | filp->private_data = buf; |
738 | 738 | ||
739 | return 0; | 739 | return nonseekable_open(inode, filp); |
740 | } | 740 | } |
741 | 741 | ||
742 | /** | 742 | /** |