- both rpciod_up and rpciod_down do a gratious inc/dec of the
use count - but we can't ever be inside those function unless
it's called from an other module -> totally useless
- rpciod() (the ernel thread) also bumps the refcount when starting
and decrements it when exiting. but as a different module must
initiate this using rpciod_up/rpciod_down this is again not needed.
(except when a module does rpciod_up without a matching rpciod_down -
but that a big bug anyway and we don't need to partially handle that
using module refcounts).
--- 1.24/net/sunrpc/sched.c Thu Mar 27 12:42:11 2003
wait_queue_head_t *assassin = (wait_queue_head_t*) ptr;
int rounds = 0;
- MOD_INC_USE_COUNT;
lock_kernel();
/*
dprintk("RPC: rpciod exiting\n");
unlock_kernel();
- MOD_DEC_USE_COUNT;
return 0;
}
{
int error = 0;
- MOD_INC_USE_COUNT;
down(&rpciod_sema);
dprintk("rpciod_up: pid %d, users %d\n", rpciod_pid, rpciod_users);
error = 0;
out:
up(&rpciod_sema);
- MOD_DEC_USE_COUNT;
return error;
}
{
unsigned long flags;
- MOD_INC_USE_COUNT;
down(&rpciod_sema);
dprintk("rpciod_down pid %d sema %d\n", rpciod_pid, rpciod_users);
spin_unlock_irqrestore(¤t->sighand->siglock, flags);
out:
up(&rpciod_sema);
- MOD_DEC_USE_COUNT;
}
#ifdef RPC_DEBUG
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/