Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0ccfd95 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jan Kara
Browse files

quota: move unmount handling into the filesystem



Currently the VFS calls into the quotactl interface for unmounting
filesystems.  This means filesystems with their own quota handling
can't easily distinguish between user-space originating quotaoff
and an unount.  Instead move the responsibily of the unmount handling
into the filesystem to be consistent with all other dquot handling.

Note that we do call dquot_disable a lot later now, e.g. after
a sync_filesystem.  But this is fine as the quota code does all its
writes via blockdev's mapping and that is synced even later.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 0f0dd62f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -119,6 +119,8 @@ static void ext2_put_super (struct super_block * sb)
	int i;
	struct ext2_sb_info *sbi = EXT2_SB(sb);

	dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);

	if (sb->s_dirt)
		ext2_write_super(sb);

+2 −0
Original line number Diff line number Diff line
@@ -410,6 +410,8 @@ static void ext3_put_super (struct super_block * sb)
	struct ext3_super_block *es = sbi->s_es;
	int i, err;

	dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);

	lock_kernel();

	ext3_xattr_put_super(sb);
+2 −0
Original line number Diff line number Diff line
@@ -645,6 +645,8 @@ static void ext4_put_super(struct super_block *sb)
	struct ext4_super_block *es = sbi->s_es;
	int i, err;

	dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);

	flush_workqueue(sbi->dio_unwritten_wq);
	destroy_workqueue(sbi->dio_unwritten_wq);

+2 −0
Original line number Diff line number Diff line
@@ -179,6 +179,8 @@ static void jfs_put_super(struct super_block *sb)

	jfs_info("In jfs_put_super");

	dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);

	lock_kernel();

	rc = jfs_umount(sb);
+2 −0
Original line number Diff line number Diff line
@@ -466,6 +466,8 @@ static void reiserfs_put_super(struct super_block *s)
	struct reiserfs_transaction_handle th;
	th.t_trans_id = 0;

	dquot_disable(s, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);

	reiserfs_write_lock(s);

	if (s->s_dirt)
Loading