]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs: remove never-read "offset" assignment in readbufr_map & writebufr
authorEric Sandeen <sandeen@sandeen.net>
Mon, 14 Apr 2014 06:13:58 +0000 (16:13 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 14 Apr 2014 06:13:58 +0000 (16:13 +1000)
commite88719889e82a81b4c86ce1d9fc3efa64fd4ed3b
treeee93136dc232cc221b05b4d258e41b2924e3aeee
parent033777858aa2f24750d23ab80b9e5e6e080d0fb5
libxfs: remove never-read "offset" assignment in readbufr_map & writebufr

libxfs_readbufr_map() & libxfs_writebufr() iterate
over bp->b_map[] and read each chunk.  The loops start
out correctly, getting the offset from bm_bn and the
length from bm_len.  After the IO it correctly
advances the target buffer pointer by len, but then
inexplicably advances "offset" by len as well.  The
whole point of this exercise is to handle discontiguous
ranges - marching offset along by length of IO done
is incorrect.

Thankfully offset is immediately reset to the proper
value again at the top of the loop for the next range,
so this is harmless, other than being confusing.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/rdwr.c