[PATCH v2 21/35] ubifs: disable quota in ubifs_put_super
Dongsheng Yang
yangds.fnst at cn.fujitsu.com
Wed Jul 29 22:48:17 PDT 2015
We need to disable quota in umounting ubifs. So we have to
disable quota in ubifs_put_super(). But quota disable will
write quota file, and we have to budget for it.
Signed-off-by: Dongsheng Yang <yangds.fnst at cn.fujitsu.com>
---
fs/ubifs/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 3609d7b..7031c16 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -2027,6 +2027,8 @@ static void ubifs_put_super(struct super_block *sb)
ubifs_msg(c, "un-mount UBI device %d", c->vi.ubi_num);
+ if (!c->ro_mount)
+ dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);
/*
* The following asserts are only valid if there has not been a failure
* of the media. For example, there will be dirty inodes if we failed
--
1.8.4.2
More information about the linux-mtd
mailing list