Thread (19 messages) 19 messages, 3 authors, 2018-01-30

Re: [PATCH 5/7] iomap: warn on zero-length mappings

From: Darrick J. Wong <hidden>
Date: 2018-01-27 18:04:59

On Fri, Jan 26, 2018 at 11:34:50PM -0800, Christoph Hellwig wrote:
quoted
-	if (WARN_ON(iomap.offset > pos))
+	if (WARN_ON(iomap.offset > pos) || WARN_ON(iomap.length == 0))
Btw, shouldn't this be one WARN_ON with both conditions inside?
It's not like we can spot which one it was based on the output
anyway.

Alternatively just have two conditionals, which allows us to spot
what went wrong.
Ah, right, I forgot that WARN_ON doesn't print the failing condition
unlike our ASSERT.

--D
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help