aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/quota.c8
-rw-r--r--include/linux/dqblk_xfs.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/fs/quota.c b/fs/quota.c
index f5d1cff55196..1df7832b4e08 100644
--- a/fs/quota.c
+++ b/fs/quota.c
@@ -118,6 +118,10 @@ static int xqm_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t i
118 if (!sb->s_qcop->get_xquota) 118 if (!sb->s_qcop->get_xquota)
119 return -ENOSYS; 119 return -ENOSYS;
120 break; 120 break;
121 case Q_XQUOTASYNC:
122 if (!sb->s_qcop->quota_sync)
123 return -ENOSYS;
124 break;
121 default: 125 default:
122 return -EINVAL; 126 return -EINVAL;
123 } 127 }
@@ -128,7 +132,7 @@ static int xqm_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t i
128 (type == XQM_GRPQUOTA && !in_egroup_p(id))) && 132 (type == XQM_GRPQUOTA && !in_egroup_p(id))) &&
129 !capable(CAP_SYS_ADMIN)) 133 !capable(CAP_SYS_ADMIN))
130 return -EPERM; 134 return -EPERM;
131 } else if (cmd != Q_XGETQSTAT) { 135 } else if (cmd != Q_XGETQSTAT && cmd != Q_XQUOTASYNC) {
132 if (!capable(CAP_SYS_ADMIN)) 136 if (!capable(CAP_SYS_ADMIN))
133 return -EPERM; 137 return -EPERM;
134 } 138 }
@@ -322,6 +326,8 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, void
322 return -EFAULT; 326 return -EFAULT;
323 return 0; 327 return 0;
324 } 328 }
329 case Q_XQUOTASYNC:
330 return sb->s_qcop->quota_sync(sb, type);
325 /* We never reach here unless validity check is broken */ 331 /* We never reach here unless validity check is broken */
326 default: 332 default:
327 BUG(); 333 BUG();
diff --git a/include/linux/dqblk_xfs.h b/include/linux/dqblk_xfs.h
index 6ad85bbd0d17..2fda1b2aabd9 100644
--- a/include/linux/dqblk_xfs.h
+++ b/include/linux/dqblk_xfs.h
@@ -37,6 +37,7 @@
37#define Q_XSETQLIM XQM_CMD(4) /* set disk limits */ 37#define Q_XSETQLIM XQM_CMD(4) /* set disk limits */
38#define Q_XGETQSTAT XQM_CMD(5) /* get quota subsystem status */ 38#define Q_XGETQSTAT XQM_CMD(5) /* get quota subsystem status */
39#define Q_XQUOTARM XQM_CMD(6) /* free disk space used by dquots */ 39#define Q_XQUOTARM XQM_CMD(6) /* free disk space used by dquots */
40#define Q_XQUOTASYNC XQM_CMD(7) /* delalloc flush, updates dquots */
40 41
41/* 42/*
42 * fs_disk_quota structure: 43 * fs_disk_quota structure: