nb = nblks = *nblocks;
/* try to allocate blocks */
- while ((rc = dbAlloc(ip, hint, nb, &daddr))) {
+ while ((rc = dbAlloc(ip, hint, nb, &daddr)) != 0) {
/* if something other than an out of space error,
* stop and return this error.
*/
if (S_ISREG(ip->i_mode) && (ji->fileset == FILESYSTEM_I)) {
ag = BLKTOAG(daddr, sbi);
+ spin_lock_irq(&ji->ag_lock);
if (ji->active_ag == -1) {
atomic_inc(&bmp->db_active[ag]);
ji->active_ag = ag;
atomic_inc(&bmp->db_active[ag]);
ji->active_ag = ag;
}
+ spin_unlock_irq(&ji->ag_lock);
}
return (0);