Commit 50fb6d2b authored by Abhishek Kulkarni's avatar Abhishek Kulkarni Committed by Eric Van Hensbergen

9p: Check for error in return value of v9fs_fid_add

Check if v9fs_fid_add was successful or not based on its
return value.
Signed-off-by: default avatarAbhishek Kulkarni <adkulkar@umail.iu.edu>
Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
parent df4ecf15
...@@ -470,7 +470,10 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir, ...@@ -470,7 +470,10 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,
dentry->d_op = &v9fs_dentry_operations; dentry->d_op = &v9fs_dentry_operations;
d_instantiate(dentry, inode); d_instantiate(dentry, inode);
v9fs_fid_add(dentry, fid); err = v9fs_fid_add(dentry, fid);
if (err < 0)
goto error;
return ofid; return ofid;
error: error:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment