diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-08-26 01:45:37 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-08-26 01:45:37 -0400 |
commit | 94d4ac2f4a58c6e37876827c6688c61cef21290c (patch) | |
tree | 732f4e4794f3c116041242f69754637f75c0dd57 /fs/ext4/balloc.c | |
parent | ed21763e7b0b3fb50e4efd9d4bc17ef5b035d304 (diff) | |
parent | 08970fc4e0385790a7b093adfaa4165a189f9eb0 (diff) |
Merge branch 'x86/urgent' into x86/cleanups
Diffstat (limited to 'fs/ext4/balloc.c')
-rw-r--r-- | fs/ext4/balloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 1ae5004e93fc..e9fa960ba6da 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c | |||
@@ -1626,6 +1626,9 @@ ext4_fsblk_t ext4_has_free_blocks(struct ext4_sb_info *sbi, | |||
1626 | free_blocks = | 1626 | free_blocks = |
1627 | percpu_counter_sum_and_set(&sbi->s_freeblocks_counter); | 1627 | percpu_counter_sum_and_set(&sbi->s_freeblocks_counter); |
1628 | #endif | 1628 | #endif |
1629 | if (free_blocks <= root_blocks) | ||
1630 | /* we don't have free space */ | ||
1631 | return 0; | ||
1629 | if (free_blocks - root_blocks < nblocks) | 1632 | if (free_blocks - root_blocks < nblocks) |
1630 | return free_blocks - root_blocks; | 1633 | return free_blocks - root_blocks; |
1631 | return nblocks; | 1634 | return nblocks; |