Skip to contentSkip to conversation

staging: lustre: llite: Remove unnecessary test in if condition

PATCH New Amitoj Kaur Chawla 1 participant 1 message Mar 2, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: lustre: llite: Remove unnecessary test in if condition

Remove unnecessary test on rc variable since it has already been tested previously.
Fixes following smatch warning:
drivers/staging/lustre/lustre/llite/llite_lib.c:1331 ll_setattr_raw()
warn: we tested 'rc' before and it was 'false'

---
 drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/llite/llite_lib.c +1 -1
index b2e8475..f251803 100644
@@ -1328,7 +1328,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
 	}
 
 	/* RPC to MDT is sent, cancel data modification flag */
-	if (rc == 0 && (op_data->op_bias & MDS_DATA_MODIFIED)) {
+	if (op_data->op_bias & MDS_DATA_MODIFIED) {
 		spin_lock(&lli->lli_lock);
 		lli->lli_flags &= ~LLIF_DATA_MODIFIED;
 		spin_unlock(&lli->lli_lock);
Signature · 1 line
1.9.1