diff options
| author | Steve French <sfrench@us.ibm.com> | 2008-08-26 16:56:05 +0000 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2008-08-26 16:56:05 +0000 |
| commit | 3dae49abef945c55c10fa7c479cfd8fd13af55db (patch) | |
| tree | 487c47c6d23cc28a259b913396aeaff0b792d32d /fs/ext4/balloc.c | |
| parent | 6ce5eecb9cd3ac97b952c50309b87c31488a45e9 (diff) | |
| parent | b8e6c91c74e9f0279b7c51048779b3d62da60b88 (diff) | |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
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 1ae5004e93f..e9fa960ba6d 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; |
