diff options
author | Shivani Bhardwaj <shivanib134@gmail.com> | 2015-10-15 18:24:05 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-16 22:29:33 -0700 |
commit | 83d6b8fee71f66ac2c55b98053be53aa3251e8fa (patch) | |
tree | 2f368fe297b4d283bcc4b1de5af4766dd99ec06e /drivers/staging/lustre | |
parent | f5ef08d8f1f51f29c9f4f7457e76789e7f10212b (diff) |
Staging: lustre: llite_lib: Remove unnecessary NULL check
Variable op_data is already tested for NULL value and therefore any
further checks should be removed.
Semantic patch used:
@@ expression E;@@
if(E==NULL) {... return ...;}
- if(E){
...
- }
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r-- | drivers/staging/lustre/lustre/llite/llite_lib.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index e3ea477b9f39..e874e631e006 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1350,14 +1350,13 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) up_write(&lli->lli_trunc_sem); } out: - if (op_data) { - if (op_data->op_ioepoch) { - rc1 = ll_setattr_done_writing(inode, op_data, mod); - if (!rc) - rc = rc1; - } - ll_finish_md_op_data(op_data); + if (op_data->op_ioepoch) { + rc1 = ll_setattr_done_writing(inode, op_data, mod); + if (!rc) + rc = rc1; } + ll_finish_md_op_data(op_data); + if (!S_ISDIR(inode->i_mode)) { mutex_lock(&inode->i_mutex); if ((attr->ia_valid & ATTR_SIZE) && !hsm_import) |