aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-07-03 10:45:28 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-22 15:58:19 -0400
commitceed17236a7491b44ee2be21f56a41ab997cbe7d (patch)
treed3204566d1a2efb4b927de039044881e16d30c2d /include
parent6eedc70150d55b5885800eb6664ea226dc2cb66f (diff)
quota: Split dquot_quota_sync() to writeback and cache flushing part
Split off part of dquot_quota_sync() which writes dquots into a quota file to a separate function. In the next patch we will use the function from filesystems and we do not want to abuse ->quota_sync quotactl callback more than necessary. Acked-by: Steven Whitehouse <swhiteho@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/quota.h2
-rw-r--r--include/linux/quotaops.h8
2 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/quota.h b/include/linux/quota.h
index c09fa042b5ea..524ede8a160a 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -333,7 +333,7 @@ struct quotactl_ops {
333 int (*quota_on)(struct super_block *, int, int, struct path *); 333 int (*quota_on)(struct super_block *, int, int, struct path *);
334 int (*quota_on_meta)(struct super_block *, int, int); 334 int (*quota_on_meta)(struct super_block *, int, int);
335 int (*quota_off)(struct super_block *, int); 335 int (*quota_off)(struct super_block *, int);
336 int (*quota_sync)(struct super_block *, int, int); 336 int (*quota_sync)(struct super_block *, int);
337 int (*get_info)(struct super_block *, int, struct if_dqinfo *); 337 int (*get_info)(struct super_block *, int, struct if_dqinfo *);
338 int (*set_info)(struct super_block *, int, struct if_dqinfo *); 338 int (*set_info)(struct super_block *, int, struct if_dqinfo *);
339 int (*get_dqblk)(struct super_block *, int, qid_t, struct fs_disk_quota *); 339 int (*get_dqblk)(struct super_block *, int, qid_t, struct fs_disk_quota *);
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index 17b977304a09..ec6b65feaaba 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -83,7 +83,8 @@ int dquot_quota_on(struct super_block *sb, int type, int format_id,
83int dquot_quota_on_mount(struct super_block *sb, char *qf_name, 83int dquot_quota_on_mount(struct super_block *sb, char *qf_name,
84 int format_id, int type); 84 int format_id, int type);
85int dquot_quota_off(struct super_block *sb, int type); 85int dquot_quota_off(struct super_block *sb, int type);
86int dquot_quota_sync(struct super_block *sb, int type, int wait); 86int dquot_writeback_dquots(struct super_block *sb, int type);
87int dquot_quota_sync(struct super_block *sb, int type);
87int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); 88int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
88int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); 89int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
89int dquot_get_dqblk(struct super_block *sb, int type, qid_t id, 90int dquot_get_dqblk(struct super_block *sb, int type, qid_t id,
@@ -255,6 +256,11 @@ static inline int dquot_resume(struct super_block *sb, int type)
255 256
256#define dquot_file_open generic_file_open 257#define dquot_file_open generic_file_open
257 258
259static inline int dquot_writeback_dquots(struct super_block *sb, int type)
260{
261 return 0;
262}
263
258#endif /* CONFIG_QUOTA */ 264#endif /* CONFIG_QUOTA */
259 265
260static inline int dquot_alloc_space_nodirty(struct inode *inode, qsize_t nr) 266static inline int dquot_alloc_space_nodirty(struct inode *inode, qsize_t nr)