staging: lustre: lustre: mdc: mdc_lib.c: Removed an unnecessary NULL check
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Wed, 17 Dec 2014 22:42:53 +0000 (23:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2015 23:43:17 +0000 (15:43 -0800)
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>
drivers/staging/lustre/lustre/mdc/mdc_lib.c

index 4e59995e00424b7423a9fb90493b2399bf36ba78..d3234cb1ea22ae8190ec64fcfe246658c6f82f49 100644 (file)
@@ -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;