summaryrefslogtreecommitdiffstats
path: root/fs/9p
diff options
context:
space:
mode:
authorAbhishek Kulkarni <adkulkar@umail.iu.edu>2009-07-19 13:41:57 -0600
committerEric Van Hensbergen <ericvh@strongmad.austin.ibm.com>2009-08-17 16:27:57 -0500
commit50fb6d2bd7062708892ae7147f30c3ee905b7a3d (patch)
tree6b5cdbe3e4f03c7bf4b043ced06cec7d34db0b1f /fs/9p
parentdf4ecf1524c7793de3121b2d4e5fc6bcc0da3bfb (diff)
downloadlinux-50fb6d2bd7062708892ae7147f30c3ee905b7a3d.tar.bz2
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>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/vfs_inode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 81f8bbf12f9f..1fa5f15eaddc 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -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: