Skip to content

Commit dd5532a

Browse files
author
Darrick J. Wong
committed
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: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Christian Brauner <brauner@kernel.org>
1 parent 5679897 commit dd5532a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

fs/quota/dquot.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,9 +690,14 @@ int dquot_quota_sync(struct super_block *sb, int type)
690690
/* This is not very clever (and fast) but currently I don't know about
691691
* any other simple way of getting quota data to disk and we must get
692692
* them there for userspace to be visible... */
693-
if (sb->s_op->sync_fs)
694-
sb->s_op->sync_fs(sb, 1);
695-
sync_blockdev(sb->s_bdev);
693+
if (sb->s_op->sync_fs) {
694+
ret = sb->s_op->sync_fs(sb, 1);
695+
if (ret)
696+
return ret;
697+
}
698+
ret = sync_blockdev(sb->s_bdev);
699+
if (ret)
700+
return ret;
696701

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

0 commit comments

Comments
 (0)