diff options
author | Robert Morris <[email protected]> | 2014-08-04 13:06:48 -0400 |
---|---|---|
committer | Robert Morris <[email protected]> | 2014-08-04 13:06:48 -0400 |
commit | 2c56547272e43b483d560a61692f1e24926a82fb (patch) | |
tree | 514014c69ff9cfe2a67159b9a3f514a3a619aea6 /fs.c | |
parent | 020c8e2384877ffc13579f633ac3c723f80baf8c (diff) | |
download | xv6-labs-2c56547272e43b483d560a61692f1e24926a82fb.tar.gz xv6-labs-2c56547272e43b483d560a61692f1e24926a82fb.tar.bz2 xv6-labs-2c56547272e43b483d560a61692f1e24926a82fb.zip |
every iput() and namei() must be inside a transaction
Diffstat (limited to 'fs.c')
-rw-r--r-- | fs.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -314,6 +314,8 @@ iunlock(struct inode *ip) // be recycled. // If that was the last reference and the inode has no links // to it, free the inode (and its content) on disk. +// All calls to iput() must be inside a transaction in +// case it has to free the inode. void iput(struct inode *ip) { @@ -601,6 +603,7 @@ skipelem(char *path, char *name) // Look up and return the inode for a path name. // If parent != 0, return the inode for the parent and copy the final // path element into name, which must have room for DIRSIZ bytes. +// Must be called inside a transaction since it calls iput(). static struct inode* namex(char *path, int nameiparent, char *name) { |