* FAILED: patch "[PATCH] ext4: simplify checking quota limits in ext4_statfs()" failed to apply to 5.5-stable tree
@ 2020-02-17 19:07 gregkh
2020-02-18 16:34 ` Sasha Levin
0 siblings, 1 reply; 4+ messages in thread
From: gregkh @ 2020-02-17 19:07 UTC (permalink / raw)
To: jack, scan-admin, tytso; +Cc: stable
The patch below does not apply to the 5.5-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 46d36880d1c6f9b9a0cbaf90235355ea1f4cab96 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Thu, 30 Jan 2020 12:11:48 +0100
Subject: [PATCH] ext4: simplify checking quota limits in ext4_statfs()
Coverity reports that conditions checking quota limits in ext4_statfs()
contain dead code. Indeed it is right and current conditions can be
simplified.
Link: https://lore.kernel.org/r/20200130111148.10766-1-jack@suse.cz
Reported-by: Coverity <scan-admin@coverity.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 88b213bd32bc..f23367a779e8 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5585,10 +5585,7 @@ static int ext4_statfs_project(struct super_block *sb,
return PTR_ERR(dquot);
spin_lock(&dquot->dq_dqb_lock);
- limit = 0;
- if (dquot->dq_dqb.dqb_bsoftlimit &&
- (!limit || dquot->dq_dqb.dqb_bsoftlimit < limit))
- limit = dquot->dq_dqb.dqb_bsoftlimit;
+ limit = dquot->dq_dqb.dqb_bsoftlimit;
if (dquot->dq_dqb.dqb_bhardlimit &&
(!limit || dquot->dq_dqb.dqb_bhardlimit < limit))
limit = dquot->dq_dqb.dqb_bhardlimit;
@@ -5603,10 +5600,7 @@ static int ext4_statfs_project(struct super_block *sb,
(buf->f_blocks - curblock) : 0;
}
- limit = 0;
- if (dquot->dq_dqb.dqb_isoftlimit &&
- (!limit || dquot->dq_dqb.dqb_isoftlimit < limit))
- limit = dquot->dq_dqb.dqb_isoftlimit;
+ limit = dquot->dq_dqb.dqb_isoftlimit;
if (dquot->dq_dqb.dqb_ihardlimit &&
(!limit || dquot->dq_dqb.dqb_ihardlimit < limit))
limit = dquot->dq_dqb.dqb_ihardlimit;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: FAILED: patch "[PATCH] ext4: simplify checking quota limits in ext4_statfs()" failed to apply to 5.5-stable tree
2020-02-17 19:07 FAILED: patch "[PATCH] ext4: simplify checking quota limits in ext4_statfs()" failed to apply to 5.5-stable tree gregkh
@ 2020-02-18 16:34 ` Sasha Levin
2020-02-18 17:08 ` Theodore Y. Ts'o
0 siblings, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2020-02-18 16:34 UTC (permalink / raw)
To: gregkh; +Cc: jack, scan-admin, tytso, stable
On Mon, Feb 17, 2020 at 08:07:40PM +0100, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 5.5-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From 46d36880d1c6f9b9a0cbaf90235355ea1f4cab96 Mon Sep 17 00:00:00 2001
>From: Jan Kara <jack@suse.cz>
>Date: Thu, 30 Jan 2020 12:11:48 +0100
>Subject: [PATCH] ext4: simplify checking quota limits in ext4_statfs()
>
>Coverity reports that conditions checking quota limits in ext4_statfs()
>contain dead code. Indeed it is right and current conditions can be
>simplified.
>
>Link: https://lore.kernel.org/r/20200130111148.10766-1-jack@suse.cz
>Reported-by: Coverity <scan-admin@coverity.com>
>Signed-off-by: Jan Kara <jack@suse.cz>
>Signed-off-by: Theodore Ts'o <tytso@mit.edu>
>Cc: stable@kernel.org
I've also grabbed 57c32ea42f8e ("ext4: choose hardlimit when softlimit
is larger than hardlimit in ext4_statfs_project()") which fixes a user
visible issue and introduces the issue fixed by this patch.
Both queued for 5.5 and 5.4.
I'm not quite sure that this patch is stable material.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FAILED: patch "[PATCH] ext4: simplify checking quota limits in ext4_statfs()" failed to apply to 5.5-stable tree
2020-02-18 16:34 ` Sasha Levin
@ 2020-02-18 17:08 ` Theodore Y. Ts'o
2020-02-18 18:21 ` Sasha Levin
0 siblings, 1 reply; 4+ messages in thread
From: Theodore Y. Ts'o @ 2020-02-18 17:08 UTC (permalink / raw)
To: Sasha Levin; +Cc: gregkh, jack, scan-admin, stable
> I'm not quite sure that this patch is stable material.
Yeah, that was a misfire on my part. I think I had somehow convinced
myself that it was a prereq for another patch that was stable
material, but looking at it again, that's not the case.
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FAILED: patch "[PATCH] ext4: simplify checking quota limits in ext4_statfs()" failed to apply to 5.5-stable tree
2020-02-18 17:08 ` Theodore Y. Ts'o
@ 2020-02-18 18:21 ` Sasha Levin
0 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2020-02-18 18:21 UTC (permalink / raw)
To: Theodore Y. Ts'o; +Cc: gregkh, jack, scan-admin, stable
On Tue, Feb 18, 2020 at 12:08:01PM -0500, Theodore Y. Ts'o wrote:
>> I'm not quite sure that this patch is stable material.
>
>Yeah, that was a misfire on my part. I think I had somehow convinced
>myself that it was a prereq for another patch that was stable
>material, but looking at it again, that's not the case.
I'll drop it, thanks.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-02-18 18:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-17 19:07 FAILED: patch "[PATCH] ext4: simplify checking quota limits in ext4_statfs()" failed to apply to 5.5-stable tree gregkh
2020-02-18 16:34 ` Sasha Levin
2020-02-18 17:08 ` Theodore Y. Ts'o
2020-02-18 18:21 ` Sasha Levin
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 NNTP newsgroup(s).