|
@@ -1583,6 +1583,12 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode,
|
|
|
if (!gdp)
|
|
if (!gdp)
|
|
|
goto io_error;
|
|
goto io_error;
|
|
|
free_blocks = le16_to_cpu(gdp->bg_free_blocks_count);
|
|
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
|
|
* skip this group if the number of
|
|
|
* free blocks is less than half of the reservation
|
|
* free blocks is less than half of the reservation
|