From: Abhishek Kulkarni Date: Sun, 19 Jul 2009 19:41:57 +0000 (-0600) Subject: 9p: Check for error in return value of v9fs_fid_add X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=50fb6d2bd7062708892ae7147f30c3ee905b7a3d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Eric Van Hensbergen --- 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: