summaryrefslogtreecommitdiff
path: root/file.h
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2017-08-08 13:48:48 -0400
committerRobert Morris <[email protected]>2017-08-08 13:48:48 -0400
commit70d912b332328cb30cd86fdf63074cf10ba5ed35 (patch)
tree938191851b452357e63e3eff80d6946cd75a8cf2 /file.h
parent3375df5061cefd188fefbc55cf57b066d7ed5da5 (diff)
downloadxv6-labs-70d912b332328cb30cd86fdf63074cf10ba5ed35.tar.gz
xv6-labs-70d912b332328cb30cd86fdf63074cf10ba5ed35.tar.bz2
xv6-labs-70d912b332328cb30cd86fdf63074cf10ba5ed35.zip
protect ip->valid and ip->nlink with sleep lock in iput()
Diffstat (limited to 'file.h')
-rw-r--r--file.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.h b/file.h
index 73a8e67..497a58a 100644
--- a/file.h
+++ b/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;