提交 5232ea06 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

create() writes to abstract variable for inode

上级 75640e70
......@@ -215,6 +215,9 @@ create(inode *cwd, const char *path, short type, short major, short minor)
{
struct inode *ip, *dp;
char name[DIRSIZ];
mt_ascope ascope("%s(%d.%d,%s,%d,%d,%d)",
__func__, cwd->dev, cwd->inum,
path, type, major, minor);
retry:
if((dp = nameiparent(cwd, path, name)) == 0)
......@@ -239,6 +242,8 @@ create(inode *cwd, const char *path, short type, short major, short minor)
ip->nlink = 1;
iupdate(ip);
mtwriteavar("inode:%x.%x", ip->dev, ip->inum);
if(type == T_DIR){ // Create . and .. entries.
dp->nlink++; // for ".."
iupdate(dp);
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论