#define DEBUG_SUBSYSTEM S_LLITE
-#ifndef __KERNEL__
-# error This file is kernel only.
-#endif
#include <obd.h>
-#include <lustre_lite.h>
-
#include "vvp_internal.h"
/*****************************************************************************
static void vvp_transient_page_verify(const struct cl_page *page)
{
- struct inode *inode = ccc_object_inode(page->cp_obj);
-
- LASSERT(!mutex_trylock(&inode->i_mutex));
}
static int vvp_transient_page_own(const struct lu_env *env,
struct ccc_object *clobj = cl2ccc(clp->cp_obj);
vvp_page_fini_common(cp);
- LASSERT(!mutex_trylock(&clobj->cob_inode->i_mutex));
- clobj->cob_transient_pages--;
+ atomic_dec(&clobj->cob_transient_pages);
}
static const struct cl_page_operations vvp_transient_page_ops = {
} else {
struct ccc_object *clobj = cl2ccc(obj);
- LASSERT(!mutex_trylock(&clobj->cob_inode->i_mutex));
cl_page_slice_add(page, &cpg->cpg_cl, obj, index,
&vvp_transient_page_ops);
- clobj->cob_transient_pages++;
+ atomic_inc(&clobj->cob_transient_pages);
}
return 0;
}