protect ip->valid and ip->nlink with sleep lock in iput()
This commit is contained in:
parent
3375df5061
commit
70d912b332
2 changed files with 12 additions and 10 deletions
4
file.h
4
file.h
|
@ -14,8 +14,8 @@ struct inode {
|
|||
uint dev; // Device number
|
||||
uint inum; // Inode number
|
||||
int ref; // Reference count
|
||||
struct sleeplock lock;
|
||||
int valid; // remainder has been read from disk?
|
||||
struct sleeplock lock; // protects everything below here
|
||||
int valid; // inode has been read from disk?
|
||||
|
||||
short type; // copy of disk inode
|
||||
short major;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue