Skip to content
Commit 7d5e049e authored by Darrick J. Wong's avatar Darrick J. Wong
Browse files

iomap: fix WARN_ON_ONCE on uninitialized variable



In commit 9dc55f13 ("iomap: add support for sub-pagesize buffered
I/O without buffer heads") we moved the initialization of poff (it's
computed from pos) into a separate helper function.  Inline data only
ever deals with pos == 0, hence the WARN_ON_ONCE, but now we're testing
an uninitialized variable.

Therefore, change the test to check the parameter directly.

Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarAllison Henderson <allison.henderson@oracle.com>
Reviewed-by: default avatarCarlos Maiolino <cmaiolino@redhat.com>
parent 1fc25f51
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment