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

Commit 8c85e125 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Al Viro
Browse files

remove ->write_super call in generic_shutdown_super



We just did a full fs writeout using sync_filesystem before, and if
that's not enough for the filesystem it can perform it's own writeout
in ->put_super, which many filesystems already do.

Move a call to foofs_write_super into every foofs_put_super for now to
guarantee identical behaviour until it's cleaned up by the individual
filesystem maintainers.

Exceptions:

 - affs already has identical copy & pasted code at the beginning of
   affs_put_super so no need to do it twice.
 - xfs does the right thing without it and I have changes pending for
   the xfs tree touching this are so I don't really need conflicts
   here..

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 517bfae2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ MODULE_LICENSE("GPL");
#define dprintf(x...)
#endif

static void bfs_write_super(struct super_block *s);
void dump_imap(const char *prefix, struct super_block *s);

struct inode *bfs_iget(struct super_block *sb, unsigned long ino)
@@ -216,6 +217,9 @@ static void bfs_put_super(struct super_block *s)
	if (!info)
		return;

	if (s->s_dirt)
		bfs_write_super(s);

	brelse(info->si_sbh);
	mutex_destroy(&info->bfs_lock);
	kfree(info->si_imap);
+3 −0
Original line number Diff line number Diff line
@@ -258,6 +258,9 @@ static void exofs_put_super(struct super_block *sb)
	int num_pend;
	struct exofs_sb_info *sbi = sb->s_fs_info;

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

	/* make sure there are no pending commands */
	for (num_pend = atomic_read(&sbi->s_curr_pending); num_pend > 0;
	     num_pend = atomic_read(&sbi->s_curr_pending)) {
+3 −0
Original line number Diff line number Diff line
@@ -114,6 +114,9 @@ static void ext2_put_super (struct super_block * sb)
	int i;
	struct ext2_sb_info *sbi = EXT2_SB(sb);

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

	ext2_xattr_put_super(sb);
	if (!(sb->s_flags & MS_RDONLY)) {
		struct ext2_super_block *es = sbi->s_es;
+3 −0
Original line number Diff line number Diff line
@@ -576,6 +576,9 @@ static void ext4_put_super(struct super_block *sb)
	struct ext4_super_block *es = sbi->s_es;
	int i, err;

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

	ext4_release_system_zone(sb);
	ext4_mb_release(sb);
	ext4_ext_release(sb);
+3 −0
Original line number Diff line number Diff line
@@ -451,6 +451,9 @@ static void fat_put_super(struct super_block *sb)
{
	struct msdos_sb_info *sbi = MSDOS_SB(sb);

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

	if (sbi->nls_disk) {
		unload_nls(sbi->nls_disk);
		sbi->nls_disk = NULL;
Loading