Explorar o código

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>
Lai Jiangshan %!s(int64=17) %!d(string=hai) anos
pai
achega
37529fe9f6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      kernel/relay.c

+ 1 - 1
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);
 }
 
 /**