Thread (15 messages) 15 messages, 3 authors, 2016-10-26

Re: [PATCH 5/6] iomap: implement direct I/O

From: Christoph Hellwig <hch@lst.de>
Date: 2016-10-26 14:02:52
Also in: linux-fsdevel, linux-xfs

On Wed, Oct 26, 2016 at 09:53:43AM -0400, Bob Peterson wrote:
It's unlikely, but bio_alloc can return NULL; shouldn't the code be
checking for that?
No, a sleeping bio_alloc can not return NULL.  If it did our I/O
code would break down badly - take a look at the implementation,
the bio_alloc_bioset documentation even explains this in detail.
| +		if (dio->error)
| +			return 0;
| +
| +		bio = bio_alloc(GFP_KERNEL, nr_pages);

Same here. Also: the code that follows is nearly identical; do you want to make
it a macro or inline function or something?
I'll take a look, but having another helper needed to follow for a
trivial struct initialization doesn't seem all that useful.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help