diff options
author | Mark Kettenis <kettenis@gnu.org> | 2001-06-09 20:30:34 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2001-06-09 20:30:34 +0000 |
commit | 534df041169b945cceb710cdef4a9039ed2d20d4 (patch) | |
tree | 8af2711fa9716a6218a30e11fc69f30cb2392578 /ext2fs | |
parent | 4643b2070c54a9888f9fa4bf0c951274d2d3d6fe (diff) |
* inode.c (diskfs_set_statfs): If number of free blocks is less
than the number of reserved blocks, set the number of available
blocks to 0.
Diffstat (limited to 'ext2fs')
-rw-r--r-- | ext2fs/ChangeLog | 6 | ||||
-rw-r--r-- | ext2fs/inode.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ext2fs/ChangeLog b/ext2fs/ChangeLog index 2c83b45d..bce6edfa 100644 --- a/ext2fs/ChangeLog +++ b/ext2fs/ChangeLog @@ -1,3 +1,9 @@ +2001-06-09 Mark Kettenis <kettenis@gnu.org> + + * inode.c (diskfs_set_statfs): If number of free blocks is less + than the number of reserved blocks, set the number of available + blocks to 0. + 2001-03-03 Roland McGrath <roland@frob.com> * hyper.c (zeroblock, modified_global_blocks): Remove superfluous diff --git a/ext2fs/inode.c b/ext2fs/inode.c index 71b00705..0485b71e 100644 --- a/ext2fs/inode.c +++ b/ext2fs/inode.c @@ -1,6 +1,6 @@ /* Inode management routines - Copyright (C) 1994,95,96,97,98,99,2000 Free Software Foundation, Inc. + Copyright (C) 1994,95,96,97,98,99,2000,01 Free Software Foundation, Inc. Converted for ext2fs by Miles Bader <miles@gnu.org> @@ -618,6 +618,8 @@ diskfs_set_statfs (struct statfs *st) st->f_blocks = sblock->s_blocks_count; st->f_bfree = sblock->s_free_blocks_count; st->f_bavail = st->f_bfree - sblock->s_r_blocks_count; + if (st->f_bfree < sblock->s_r_blocks_count) + st->f_bavail = 0; st->f_files = sblock->s_inodes_count; st->f_ffree = sblock->s_free_inodes_count; st->f_fsid = getpid (); |