]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
set relay file can not be read by pread(2)
authorLai Jiangshan <laijs@cn.fujitsu.com>
Wed, 26 Mar 2008 11:01:28 +0000 (12:01 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 26 Mar 2008 11:01:28 +0000 (12:01 +0100)
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>
kernel/relay.c

index 4c035a8a248c2bfabea85bfd616c9562fcf4f440..ed3f6cf2db861917091536d949895b4864f38139 100644 (file)
@@ -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);
 }
 
 /**