Skip to content

Commit

Permalink
set relay file can not be read by pread(2)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lai Jiangshan authored and Jens Axboe committed Mar 26, 2008
1 parent 05dda97 commit 37529fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/relay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 37529fe

Please sign in to comment.