diff options
Diffstat (limited to 'fs/ext2')
-rw-r--r-- | fs/ext2/balloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 10bb02c3f25c..6dac7ba2d22d 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c | |||
@@ -1295,6 +1295,7 @@ retry_alloc: | |||
1295 | * turn off reservation for this allocation | 1295 | * turn off reservation for this allocation |
1296 | */ | 1296 | */ |
1297 | if (my_rsv && (free_blocks < windowsz) | 1297 | if (my_rsv && (free_blocks < windowsz) |
1298 | && (free_blocks > 0) | ||
1298 | && (rsv_is_empty(&my_rsv->rsv_window))) | 1299 | && (rsv_is_empty(&my_rsv->rsv_window))) |
1299 | my_rsv = NULL; | 1300 | my_rsv = NULL; |
1300 | 1301 | ||
@@ -1332,7 +1333,7 @@ retry_alloc: | |||
1332 | * free blocks is less than half of the reservation | 1333 | * free blocks is less than half of the reservation |
1333 | * window size. | 1334 | * window size. |
1334 | */ | 1335 | */ |
1335 | if (free_blocks <= (windowsz/2)) | 1336 | if (my_rsv && (free_blocks <= (windowsz/2))) |
1336 | continue; | 1337 | continue; |
1337 | 1338 | ||
1338 | brelse(bitmap_bh); | 1339 | brelse(bitmap_bh); |