1 |
/* |
/* |
2 |
Copyright (C) 1994, 1995, 1996 Free Software Foundation |
Copyright (C) 1994,95,96,2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
5 |
modify it under the terms of the GNU General Public License as |
modify it under the terms of the GNU General Public License as |
25 |
diskfs_make_node (struct disknode *dn) |
diskfs_make_node (struct disknode *dn) |
26 |
{ |
{ |
27 |
struct node *np = malloc (sizeof (struct node)); |
struct node *np = malloc (sizeof (struct node)); |
28 |
|
|
29 |
|
if (np == 0) |
30 |
|
return 0; |
31 |
|
|
32 |
np->dn = dn; |
np->dn = dn; |
33 |
np->dn_set_ctime = 0; |
np->dn_set_ctime = 0; |
34 |
np->dn_set_atime = 0; |
np->dn_set_atime = 0; |
35 |
np->dn_set_mtime = 0; |
np->dn_set_mtime = 0; |
36 |
np->dn_stat_dirty = 0; |
np->dn_stat_dirty = 0; |
37 |
|
|
38 |
mutex_init (&np->lock); |
mutex_init (&np->lock); |
39 |
np->references = 1; |
np->references = 1; |
40 |
np->light_references = 0; |
np->light_references = 0; |
43 |
|
|
44 |
np->dirmod_reqs = 0; |
np->dirmod_reqs = 0; |
45 |
np->filemod_reqs = 0; |
np->filemod_reqs = 0; |
46 |
|
|
47 |
fshelp_transbox_init (&np->transbox, &np->lock, np); |
fshelp_transbox_init (&np->transbox, &np->lock, np); |
48 |
iohelp_initialize_conch (&np->conch, &np->lock); |
iohelp_initialize_conch (&np->conch, &np->lock); |
49 |
fshelp_lock_init (&np->userlock); |
fshelp_lock_init (&np->userlock); |
|
|
|
50 |
|
|
51 |
return np; |
return np; |
52 |
} |
} |