summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>2014-12-17 23:42:53 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-17 15:43:17 -0800
commitcc1cf0e0e6566afcf9fd5346c0fe3c3fd6b9b2ac (patch)
tree398909bb20b49a77ffd5192685d06d3c6609c6e5
parentf56cb9da50ea8c38d397534cd45aff53d7f693dc (diff)
downloadlinux-cc1cf0e0e6566afcf9fd5346c0fe3c3fd6b9b2ac.tar.bz2
staging: lustre: lustre: mdc: mdc_lib.c: Removed an unnecessary NULL check
Removed an unnecessary NULL check. I have checked the only place this function is called from. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lustre/mdc/mdc_lib.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
index 4e59995e0042..d3234cb1ea22 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
@@ -222,10 +222,9 @@ void mdc_open_pack(struct ptlrpc_request *req, struct md_op_data *op_data,
rec->cr_fsuid = from_kuid(&init_user_ns, current_fsuid());
rec->cr_fsgid = from_kgid(&init_user_ns, current_fsgid());
rec->cr_cap = cfs_curproc_cap_pack();
- if (op_data != NULL) {
- rec->cr_fid1 = op_data->op_fid1;
- rec->cr_fid2 = op_data->op_fid2;
- }
+ rec->cr_fid1 = op_data->op_fid1;
+ rec->cr_fid2 = op_data->op_fid2;
+
rec->cr_mode = mode;
cr_flags = mds_pack_open_flags(flags, mode);
rec->cr_rdev = rdev;