瀏覽代碼

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 17 年之前
父節點
當前提交
37529fe9f6
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);
 }
 
 /**