GFS2: Fix case where reservation finished at end of rgrp
>From 8733e61ea11a05ff5ebadbaf3bae846368b4bd05 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Tue, 7 Aug 2012 13:47:12 +0100
Subject: [PATCH] GFS2: Fix case where reservation finished at end of rgrp
One corner case which the original patch failed to take into
account was when there is a reservation which ended such that
the following block was one beyond the end of the rgrp in
question. This extra test fixes that case.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Reported-by: Bob Peterson <rpeterso@redhat.com>
Tested-by: Bob Peterson <rpeterso@redhat.com>
bitmap_full: /* Mark bitmap as full and fall through */
@@ -1608,6 +1614,7 @@ next_bitmap: /* Find next bitmap in the rgrp */
index++;
if (index == rbm->rgd->rd_length)
index = 0;
+res_covered_end_of_rgrp:
rbm->bi = &rbm->rgd->rd_bits[index];
if ((index == 0) && nowrap)
break;
--
1.7.4