]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ext2/balloc.c
ide: Add tx4939ide driver (v6)
[linux-2.6-omap-h63xx.git] / fs / ext2 / balloc.c
index 10bb02c3f25cfcdee98897b6d7efe96e5f3ae6a1..6dac7ba2d22d7ff41855b7866f757417612c09ea 100644 (file)
@@ -1295,6 +1295,7 @@ retry_alloc:
         * turn off reservation for this allocation
         */
        if (my_rsv && (free_blocks < windowsz)
+               && (free_blocks > 0)
                && (rsv_is_empty(&my_rsv->rsv_window)))
                my_rsv = NULL;
 
@@ -1332,7 +1333,7 @@ retry_alloc:
                 * free blocks is less than half of the reservation
                 * window size.
                 */
-               if (free_blocks <= (windowsz/2))
+               if (my_rsv && (free_blocks <= (windowsz/2)))
                        continue;
 
                brelse(bitmap_bh);