diff options
| author | Robert Richter <robert.richter@amd.com> | 2008-09-24 11:25:31 +0200 |
|---|---|---|
| committer | Robert Richter <robert.richter@amd.com> | 2008-09-24 11:25:31 +0200 |
| commit | f78e80209cf143be49f268c340431ae9fa3abb74 (patch) | |
| tree | 820fa64b688099dfdd93d27ba03252738ca5c7e2 /fs/ext4/balloc.c | |
| parent | 4c168eaf7ea39f25a45a3d8c7eebc3fedb633a1d (diff) | |
| parent | 24342c34a022ee90839873d91396045e12ef1090 (diff) | |
Merge commit 'v2.6.27-rc5' into tip/oprofile
Conflicts:
arch/x86/oprofile/nmi_int.c
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, free_blocks = percpu_counter_sum_and_set(&sbi->s_freeblocks_counter); #endif + if (free_blocks <= root_blocks) + /* we don't have free space */ + return 0; if (free_blocks - root_blocks < nblocks) return free_blocks - root_blocks; return nblocks; |
