diff mbox

[09/17] quota: Make Q_XQUOTASYNC support VFS quota syncing

Message ID 1421412471-4747-10-git-send-email-jack@suse.cz (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Kara Jan. 16, 2015, 12:47 p.m. UTC
Call ->quota_sync method from Q_XQUOTASYNC for better userspace
compatibility.

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

Comments

Christoph Hellwig Jan. 19, 2015, 9:09 a.m. UTC | #1
On Fri, Jan 16, 2015 at 01:47:43PM +0100, Jan Kara wrote:
> Call ->quota_sync method from Q_XQUOTASYNC for better userspace
> compatibility.

Q_XQUOTASYNC never did the equivalent to ->quota_sync, but rather was
the equivalent to sys_syncfs which also happens to write out quotas.

Unless you have a really strong reason for wiring it up, I'd rather keep
it as-is.
Jan Kara Jan. 20, 2015, 5:16 p.m. UTC | #2
On Mon 19-01-15 01:09:14, Christoph Hellwig wrote:
> On Fri, Jan 16, 2015 at 01:47:43PM +0100, Jan Kara wrote:
> > Call ->quota_sync method from Q_XQUOTASYNC for better userspace
> > compatibility.
> 
> Q_XQUOTASYNC never did the equivalent to ->quota_sync, but rather was
> the equivalent to sys_syncfs which also happens to write out quotas.
> 
> Unless you have a really strong reason for wiring it up, I'd rather keep
> it as-is.
  OK, patch dropped.

								Honza
diff mbox

Patch

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;
 	}