Do not increment the clean segment counter, if a segment that the cleaner

is trying to clean is already clean (e.g., if two lfs_cleanerds are running
at once.)
This commit is contained in:
perseant 2000-10-20 17:48:05 +00:00
parent f47e330c15
commit 26f26aafcd
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: lfs_syscalls.c,v 1.49 2000/09/09 04:49:55 perseant Exp $ */
/* $NetBSD: lfs_syscalls.c,v 1.50 2000/10/20 17:48:05 perseant Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@ -784,6 +784,10 @@ sys_lfs_segclean(p, v, retval)
brelse(bp);
return (EBUSY);
}
if (!(sup->su_flags & SEGUSE_DIRTY)) {
brelse(bp);
return (EALREADY);
}
fs->lfs_avail += fsbtodb(fs, fs->lfs_ssize);
if (sup->su_flags & SEGUSE_SUPERBLOCK)