]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ext3/balloc.c
fat: Fix and cleanup timestamp conversion
[linux-2.6-omap-h63xx.git] / fs / ext3 / balloc.c
index 92fd0338a6ebe3df16739b65feec4e4ef034206f..f5b57a2ca35a5c4cb10a369933bec40291c78109 100644 (file)
@@ -1547,6 +1547,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;
 
@@ -1585,7 +1586,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);