lkml.org 
[lkml]   [2023]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v6 01/34] vfs: Unconditionally set IOCB_WRITE in call_write_iter()
Date
Christoph Hellwig <hch@infradead.org> wrote:

> I suspect the best is to:
>
> - rename init_sync_kiocb to init_kiocb
> - pass a new argument for the direction to it. I'm not entirely
> sure if flags is a good thing, or an explicit READ/WRITE might be
> better because it's harder to get wrong, even if a the compiler
> might generate worth code for it.

So something like:

init_kiocb(kiocb, file, WRITE);
init_kiocb(kiocb, file, READ);

David

\
 
 \ /
  Last update: 2023-03-26 23:44    [W:0.583 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site