aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/llite/namei.c
diff options
context:
space:
mode:
authorJohn L. Hammond <john.hammond@intel.com>2016-09-18 16:37:35 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-19 09:40:35 +0200
commit5d9d0cb76cdbec99af87dcbac80c66d1702d1fe6 (patch)
tree129ce0be0879d6a89a49032931a3f4d7bd49a303 /drivers/staging/lustre/lustre/llite/namei.c
parentstaging: lustre: llite: style cleanup for ll_mkdir (diff)
downloadlinux-dev-5d9d0cb76cdbec99af87dcbac80c66d1702d1fe6.tar.xz
linux-dev-5d9d0cb76cdbec99af87dcbac80c66d1702d1fe6.zip
staging: lustre: llite: no need to check dentry is NULL
We are already touching dentry in CDEBUG macros so it will crash long before these checks. Since this is the case no need to do an additional check. Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/10769 Reviewed-by: Yang Sheng <yang.sheng@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/namei.c')
-rw-r--r--drivers/staging/lustre/lustre/llite/namei.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
index 5e182fc9a8c9..7a82ae4d7b47 100644
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -987,7 +987,7 @@ static int ll_unlink(struct inode *dir, struct dentry *dchild)
if (IS_ERR(op_data))
return PTR_ERR(op_data);
- if (dchild && dchild->d_inode)
+ if (dchild->d_inode)
op_data->op_fid3 = *ll_inode2fid(dchild->d_inode);
op_data->op_fid2 = op_data->op_fid3;
@@ -1039,7 +1039,7 @@ static int ll_rmdir(struct inode *dir, struct dentry *dchild)
if (IS_ERR(op_data))
return PTR_ERR(op_data);
- if (dchild && dchild->d_inode)
+ if (dchild->d_inode)
op_data->op_fid3 = *ll_inode2fid(dchild->d_inode);
op_data->op_fid2 = op_data->op_fid3;
@@ -1120,9 +1120,9 @@ static int ll_rename(struct inode *src, struct dentry *src_dchild,
if (IS_ERR(op_data))
return PTR_ERR(op_data);
- if (src_dchild && src_dchild->d_inode)
+ if (src_dchild->d_inode)
op_data->op_fid3 = *ll_inode2fid(src_dchild->d_inode);
- if (tgt_dchild && tgt_dchild->d_inode)
+ if (tgt_dchild->d_inode)
op_data->op_fid4 = *ll_inode2fid(tgt_dchild->d_inode);
err = md_rename(sbi->ll_md_exp, op_data,