LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] set relay file can not be read by pread(2)
@ 2008-03-26 7:44 Lai Jiangshan
2008-03-26 11:01 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Lai Jiangshan @ 2008-03-26 7:44 UTC (permalink / raw)
To: linux-kernel
Hi:
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>
--- linux-2.6.24/kernel/relay.c.org 2008-01-25 06:58:37.000000000 +0800
+++ linux-2.6.24/kernel/relay.c 2008-03-17 23:53:14.000000000 +0800
@@ -741,7 +741,7 @@ static int relay_file_open(struct inode
kref_get(&buf->kref);
filp->private_data = buf;
- return 0;
+ return nonseekable_open(inode, filp);
}
/**
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] set relay file can not be read by pread(2)
2008-03-26 7:44 [PATCH] set relay file can not be read by pread(2) Lai Jiangshan
@ 2008-03-26 11:01 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2008-03-26 11:01 UTC (permalink / raw)
To: Lai Jiangshan; +Cc: linux-kernel
On Wed, Mar 26 2008, Lai Jiangshan wrote:
> Hi:
> 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>
>
> --- linux-2.6.24/kernel/relay.c.org 2008-01-25 06:58:37.000000000 +0800
> +++ linux-2.6.24/kernel/relay.c 2008-03-17 23:53:14.000000000 +0800
> @@ -741,7 +741,7 @@ static int relay_file_open(struct inode
> kref_get(&buf->kref);
> filp->private_data = buf;
>
> - return 0;
> + return nonseekable_open(inode, filp);
> }
>
> /**
Good catch. I'll add it for 2.6.25.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-26 11:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-26 7:44 [PATCH] set relay file can not be read by pread(2) Lai Jiangshan
2008-03-26 11:01 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).