Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282951
b: refs/heads/master
c: b605479
h: refs/heads/master
i:
  282949: 2ed5e00
  282947: 37729a9
  282943: 1d8a1dd
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Eric Van Hensbergen committed Jan 5, 2012
1 parent eb68585 commit ab3b0bf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: df345c674b6366952a21a67604c8f6d489bb7ea7
refs/heads/master: b6054793069bf08fcf220fff5fb33735d5493594
43 changes: 24 additions & 19 deletions trunk/fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,26 +680,31 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,
goto error;
}

/* now walk from the parent so we can get unopened fid */
fid = p9_client_walk(dfid, 1, &name, 1);
if (IS_ERR(fid)) {
err = PTR_ERR(fid);
p9_debug(P9_DEBUG_VFS, "p9_client_walk failed %d\n", err);
fid = NULL;
goto error;
}

/* instantiate inode and assign the unopened fid to the dentry */
inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb);
if (IS_ERR(inode)) {
err = PTR_ERR(inode);
p9_debug(P9_DEBUG_VFS, "inode creation failed %d\n", err);
goto error;
if (!(perm & P9_DMLINK)) {
/* now walk from the parent so we can get unopened fid */
fid = p9_client_walk(dfid, 1, &name, 1);
if (IS_ERR(fid)) {
err = PTR_ERR(fid);
p9_debug(P9_DEBUG_VFS,
"p9_client_walk failed %d\n", err);
fid = NULL;
goto error;
}
/*
* instantiate inode and assign the unopened fid to the dentry
*/
inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb);
if (IS_ERR(inode)) {
err = PTR_ERR(inode);
p9_debug(P9_DEBUG_VFS,
"inode creation failed %d\n", err);
goto error;
}
err = v9fs_fid_add(dentry, fid);
if (err < 0)
goto error;
d_instantiate(dentry, inode);
}
err = v9fs_fid_add(dentry, fid);
if (err < 0)
goto error;
d_instantiate(dentry, inode);
return ofid;
error:
if (ofid)
Expand Down

0 comments on commit ab3b0bf

Please sign in to comment.