[Ocfs2-devel] [PATCH 12/25] quota: Make Q_XQUOTASYNC support VFS quota syncing

Jan Kara jack at suse.cz
Thu Dec 18 07:37:26 PST 2014


Call ->quota_sync method from Q_XQUOTASYNC for better userspace
compatibility.

Signed-off-by: Jan Kara <jack at suse.cz>
---
 fs/quota/quota.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index 2cc50b35a3b5..5ec04321aace 100644
--- a/fs/quota/quota.c
+++ b/fs/quota/quota.c
@@ -477,8 +477,9 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id,
 	case Q_XQUOTASYNC:
 		if (sb->s_flags & MS_RDONLY)
 			return -EROFS;
-		/* XFS quotas are fully coherent now, making this call a noop */
-		return 0;
+		if (!sb->s_qcop->quota_sync)
+			return 0;
+		return sb->s_qcop->quota_sync(sb, type);
 	default:
 		return -EINVAL;
 	}
-- 
1.8.4.5




More information about the Ocfs2-devel mailing list