Skip to contentSkip to conversation

quota: fix wrong indentation

PATCH In review Chengguang Xu 2 participants 2 messages Apr 19, 2019 – Apr 25, 2019 Diskquota

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 quota: fix wrong indentation

We need to check return code only when calling ->read_dqblk(), so fix it properly.

---
 fs/quota/dquot.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
fs/quota/dquot.c +4 -3
index fc20e06c56ba..934b8f3f9e57 100644
@@ -424,10 +424,11 @@ int dquot_acquire(struct dquot *dquot)
 	struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
 
 	mutex_lock(&dquot->dq_lock);
-	if (!test_bit(DQ_READ_B, &dquot->dq_flags))
+	if (!test_bit(DQ_READ_B, &dquot->dq_flags)) {
 		ret = dqopt->ops[dquot->dq_id.type]->read_dqblk(dquot);
-	if (ret < 0)
-		goto out_iolock;
+		if (ret < 0)
+			goto out_iolock;
+	}
 	/* Make sure flags update is visible after dquot has been filled */
 	smp_mb__before_atomic();
 	set_bit(DQ_READ_B, &dquot->dq_flags);

--
2.20.1

#1 lore raw
Quoted 4 lines · Chengguang Xu

We need to check return code only when calling ->read_dqblk(), so fix it properly.

Thanks. Added to my tree.

Honza

Quoted 27 lines
---
 fs/quota/dquot.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
fs/quota/dquot.c +4 -4
index fc20e06c56ba..934b8f3f9e57 100644
@@ -424,10 +424,11 @@ int dquot_acquire(struct dquot *dquot)
 	struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
 
 	mutex_lock(&dquot->dq_lock);
-	if (!test_bit(DQ_READ_B, &dquot->dq_flags))
+	if (!test_bit(DQ_READ_B, &dquot->dq_flags)) {
 		ret = dqopt->ops[dquot->dq_id.type]->read_dqblk(dquot);
-	if (ret < 0)
-		goto out_iolock;
+		if (ret < 0)
+			goto out_iolock;
+	}
 	/* Make sure flags update is visible after dquot has been filled */
 	smp_mb__before_atomic();
 	set_bit(DQ_READ_B, &dquot->dq_flags);
--

2.20.1

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR