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: Abhishek Kulkarni <adkulkar@umail.iu.edu>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
This commit is contained in:
Abhishek Kulkarni 2009-07-19 13:41:57 -06:00 committed by Eric Van Hensbergen
parent df4ecf1524
commit 50fb6d2bd7
1 changed files with 4 additions and 1 deletions

View File

@ -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: