kernel/vm: Add some more AssertLocked()s in VMCache commitment methods.
And remove a now-redundant one.
This commit is contained in:
@@ -720,6 +720,8 @@ VMAnonymousCache::Commit(off_t size, int priority)
|
|||||||
{
|
{
|
||||||
TRACE("%p->VMAnonymousCache::Commit(%" B_PRIdOFF ")\n", this, size);
|
TRACE("%p->VMAnonymousCache::Commit(%" B_PRIdOFF ")\n", this, size);
|
||||||
|
|
||||||
|
AssertLocked();
|
||||||
|
|
||||||
// If we can overcommit, we don't commit here, but in Fault(). We always
|
// If we can overcommit, we don't commit here, but in Fault(). We always
|
||||||
// unreserve memory, if we're asked to shrink our commitment, though.
|
// unreserve memory, if we're asked to shrink our commitment, though.
|
||||||
if (fCanOvercommit && size > committed_size) {
|
if (fCanOvercommit && size > committed_size) {
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ VMAnonymousNoSwapCache::Init(bool canOvercommit, int32 numPrecommittedPages,
|
|||||||
status_t
|
status_t
|
||||||
VMAnonymousNoSwapCache::Commit(off_t size, int priority)
|
VMAnonymousNoSwapCache::Commit(off_t size, int priority)
|
||||||
{
|
{
|
||||||
|
AssertLocked();
|
||||||
|
|
||||||
// If we can overcommit, we don't commit here, but in Fault(). We always
|
// If we can overcommit, we don't commit here, but in Fault(). We always
|
||||||
// unreserve memory, if we're asked to shrink our commitment, though.
|
// unreserve memory, if we're asked to shrink our commitment, though.
|
||||||
if (fCanOvercommit && size > committed_size) {
|
if (fCanOvercommit && size > committed_size) {
|
||||||
|
|||||||
@@ -1083,8 +1083,6 @@ VMCache::SetMinimalCommitment(off_t commitment, int priority)
|
|||||||
{
|
{
|
||||||
TRACE(("VMCache::SetMinimalCommitment(cache %p, commitment %" B_PRIdOFF
|
TRACE(("VMCache::SetMinimalCommitment(cache %p, commitment %" B_PRIdOFF
|
||||||
")\n", this, commitment));
|
")\n", this, commitment));
|
||||||
AssertLocked();
|
|
||||||
|
|
||||||
T(SetMinimalCommitment(this, commitment));
|
T(SetMinimalCommitment(this, commitment));
|
||||||
|
|
||||||
status_t status = B_OK;
|
status_t status = B_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user