]> Pileus Git - ~andy/linux/blobdiff - fs/ext3/balloc.c
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / fs / ext3 / balloc.c
index a177122a1b2584170d609b0282bf1fd094bd86b9..4a32511f4deda7f75b45aeb719d41407e416cb55 100644 (file)
@@ -1583,6 +1583,12 @@ retry_alloc:
                if (!gdp)
                        goto io_error;
                free_blocks = le16_to_cpu(gdp->bg_free_blocks_count);
+               /*
+                * skip this group (and avoid loading bitmap) if there
+                * are no free blocks
+                */
+               if (!free_blocks)
+                       continue;
                /*
                 * skip this group if the number of
                 * free blocks is less than half of the reservation