[dm-devel] dm-bufio: break out of both loops when freeing data

Mike Snitzer snitzer at redhat.com
Wed Oct 1 18:42:31 UTC 2014


On Wed, Oct 01 2014 at  1:35pm -0400,
Mikulas Patocka <mpatocka at redhat.com> wrote:

> 
> 
> On Wed, 1 Oct 2014, Mikulas Patocka wrote:
> 
> > When we free the required number of entries (nr_to_scan becomes zero), we
> > must break out of both loops. The code exited only the inner loop and
> > continued in the outer loop.
> > 
> > Also, move dm_bufio_cond_resched to the inner loop, so that scanning the
> > list doesn't result in scheduling latency.
> > 
> > Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
> 
> I forgot to add:
> 
> Cc: stable at vger.kernel.org	# 3.2+

I tweaked the header, used a return rather than goto, and staged in
linux-next for 3.18.  See:
https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=04c308f43a90a9b3b84c344b324d6af29288da05




More information about the dm-devel mailing list