Skip to content

Commit

Permalink
9p: Check for error in return value of v9fs_fid_add
Browse files Browse the repository at this point in the history
Check if v9fs_fid_add was successful or not based on its
return value.

Signed-off-by: Abhishek Kulkarni <adkulkar@umail.iu.edu>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
  • Loading branch information
Abhishek Kulkarni authored and Eric Van Hensbergen committed Aug 17, 2009
1 parent df4ecf1 commit 50fb6d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,10 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,
dentry->d_op = &v9fs_dentry_operations;

d_instantiate(dentry, inode);
v9fs_fid_add(dentry, fid);
err = v9fs_fid_add(dentry, fid);
if (err < 0)
goto error;

return ofid;

error:
Expand Down

0 comments on commit 50fb6d2

Please sign in to comment.