All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: fix warning message to output correct type.
@ 2018-07-13  9:15 Junichi Uekawa
  2018-07-22 22:23 ` Theodore Y. Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Junichi Uekawa @ 2018-07-13  9:15 UTC (permalink / raw)
  To: tytso, adilger.kernel; +Cc: linux-ext4, linux-kernel, Junichi Uekawa

Output the warning message before we clobber type and be -1 all the time.
The error message would now be

[    1.519791] EXT4-fs warning (device vdb): ext4_enable_quotas:5402:
Failed to enable quota tracking (type=0, err=-3). Please run e2fsck to fix.

Signed-off-by: Junichi Uekawa <uekawa@google.com>
---
 fs/ext4/super.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index ba2396a7bd04..1b90f619663c 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5670,13 +5670,13 @@ static int ext4_enable_quotas(struct super_block *sb)
 				DQUOT_USAGE_ENABLED |
 				(quota_mopt[type] ? DQUOT_LIMITS_ENABLED : 0));
 			if (err) {
-				for (type--; type >= 0; type--)
-					dquot_quota_off(sb, type);
-
 				ext4_warning(sb,
 					"Failed to enable quota tracking "
 					"(type=%d, err=%d). Please run "
 					"e2fsck to fix.", type, err);
+				for (type--; type >= 0; type--)
+					dquot_quota_off(sb, type);
+
 				return err;
 			}
 		}
-- 
2.18.0.203.gfac676dfb9-goog


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

* Re: [PATCH] ext4: fix warning message to output correct type.
  2018-07-13  9:15 [PATCH] ext4: fix warning message to output correct type Junichi Uekawa
@ 2018-07-22 22:23 ` Theodore Y. Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Y. Ts'o @ 2018-07-22 22:23 UTC (permalink / raw)
  To: Junichi Uekawa; +Cc: adilger.kernel, linux-ext4, linux-kernel

On Fri, Jul 13, 2018 at 06:15:47PM +0900, Junichi Uekawa wrote:
> Output the warning message before we clobber type and be -1 all the time.
> The error message would now be
> 
> [    1.519791] EXT4-fs warning (device vdb): ext4_enable_quotas:5402:
> Failed to enable quota tracking (type=0, err=-3). Please run e2fsck to fix.
> 
> Signed-off-by: Junichi Uekawa <uekawa@google.com>

Thanks, applied.

					- Ted

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

end of thread, other threads:[~2018-07-22 22:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13  9:15 [PATCH] ext4: fix warning message to output correct type Junichi Uekawa
2018-07-22 22:23 ` Theodore Y. Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.