Commit dd5532a4 authored by Darrick J. Wong's avatar Darrick J. Wong
Browse files

quota: make dquot_quota_sync return errors from ->sync_fs



Strangely, dquot_quota_sync ignores the return code from the ->sync_fs
call, which means that quotacalls like Q_SYNC never see the error.  This
doesn't seem right, so fix that.

Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarChristian Brauner <brauner@kernel.org>
parent 5679897e
Loading
Loading
Loading
Loading
+8 −3
Original line number Original line Diff line number Diff line
@@ -690,9 +690,14 @@ int dquot_quota_sync(struct super_block *sb, int type)
	/* This is not very clever (and fast) but currently I don't know about
	/* This is not very clever (and fast) but currently I don't know about
	 * any other simple way of getting quota data to disk and we must get
	 * any other simple way of getting quota data to disk and we must get
	 * them there for userspace to be visible... */
	 * them there for userspace to be visible... */
	if (sb->s_op->sync_fs)
	if (sb->s_op->sync_fs) {
		sb->s_op->sync_fs(sb, 1);
		ret = sb->s_op->sync_fs(sb, 1);
	sync_blockdev(sb->s_bdev);
		if (ret)
			return ret;
	}
	ret = sync_blockdev(sb->s_bdev);
	if (ret)
		return ret;


	/*
	/*
	 * Now when everything is written we can discard the pagecache so
	 * Now when everything is written we can discard the pagecache so