LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] quota: fix wrong indentation
@ 2019-04-19  5:46 Chengguang Xu
  2019-04-25  9:59 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Chengguang Xu @ 2019-04-19  5:46 UTC (permalink / raw
  To: jack; +Cc: linux-kernel, Chengguang Xu

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

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
---
 fs/quota/dquot.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index fc20e06c56ba..934b8f3f9e57 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] quota: fix wrong indentation
  2019-04-19  5:46 [PATCH] quota: fix wrong indentation Chengguang Xu
@ 2019-04-25  9:59 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2019-04-25  9:59 UTC (permalink / raw
  To: Chengguang Xu; +Cc: jack, linux-kernel

On Fri 19-04-19 13:46:01, Chengguang Xu wrote:
> We need to check return code only when calling ->read_dqblk(),
> so fix it properly.
> 
> Signed-off-by: Chengguang Xu <cgxu519@gmx.com>

Thanks. Added to my tree.

								Honza

> ---
>  fs/quota/dquot.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
> index fc20e06c56ba..934b8f3f9e57 100644
> --- a/fs/quota/dquot.c
> +++ b/fs/quota/dquot.c
> @@ -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
> 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-25 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-19  5:46 [PATCH] quota: fix wrong indentation Chengguang Xu
2019-04-25  9:59 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).