#include "afsincludes.h" /*AFS-based standard headers */
int
-osi_TryEvictVCache(struct vcache *avc, int *slept, int defersleep) {
+osi_TryEvictVCache(struct vcache *avc, int *slept, int defersleep)
+{
int code;
/* we can't control whether we sleep */
if (!VREFCOUNT_GT(avc,0)
extern char *makesname();
struct vcache *
-osi_NewVnode(void) {
+osi_NewVnode(void)
+{
struct vcache *avc;
char name[METER_NAMSZ];
avc = afs_osi_Alloc(sizeof(struct vcache));
+ if (avc == NULL) {
+ return NULL;
+ }
memset(avc, 0, sizeof(struct vcache));
avc->v.v_number = ++afsvnumbers;
}
void
-osi_PrePopulateVCache(struct vcache *avc) {
+osi_PrePopulateVCache(struct vcache *avc)
+{
avc->uncred = 0;
memset(&(avc->f), 0, sizeof(struct fvcache));
}
void
-osi_AttachVnode(struct vcache *avc, int seq) { }
+osi_AttachVnode(struct vcache *avc, int seq)
+{
+}
void
-osi_PostPopulateVCache(struct vcache *avc) {
+osi_PostPopulateVCache(struct vcache *avc)
+{
memset(&(avc->vc_bhv_desc), 0, sizeof(avc->vc_bhv_desc));
bhv_desc_init(&(avc->vc_bhv_desc), avc, avc, &Afs_vnodeops);
avc->lastr = 0;
}
+int
+osi_vnhold(struct vcache *avc)
+{
+ VN_HOLD(AFSTOV(avc));
+ return 0;
+}