aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-04-27 10:43:54 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:36:04 -0400
commit850b201b087f5525a0a7278551c2bcd0423c3b26 (patch)
treea076f135430380d2ffaeb041ee53d09352cb2752 /include
parent60b0680fa236ac4e17ce31a50048c9d75f9ec831 (diff)
quota: cleanup dquota sync functions (version 4)
Currently the VFS calls vfs_dq_sync to sync out disk quotas for a given superblock. This is a small wrapper around sync_dquots which for the case of a non-NULL superblock is a small wrapper around quota_sync_sb. Just make quota_sync_sb global (rename it to sync_quota_sb) and call it directly. Also call it directly for those cases in quota.c that have a superblock and leave sync_dquots purely an iterator over sync_quota_sb and remove it's superblock argument. To make this nicer move the check for the lack of a quota_sync method from the callers into sync_quota_sb. [folded build fix from Alexander Beregalov <a.beregalov@gmail.com>] Signed-off-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/quotaops.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index 36353d95c8db..047310fa22fb 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -20,7 +20,7 @@ static inline struct quota_info *sb_dqopt(struct super_block *sb)
20/* 20/*
21 * declaration of quota_function calls in kernel. 21 * declaration of quota_function calls in kernel.
22 */ 22 */
23void sync_dquots(struct super_block *sb, int type); 23void sync_quota_sb(struct super_block *sb, int type);
24 24
25int dquot_initialize(struct inode *inode, int type); 25int dquot_initialize(struct inode *inode, int type);
26int dquot_drop(struct inode *inode); 26int dquot_drop(struct inode *inode);
@@ -253,12 +253,7 @@ static inline void vfs_dq_free_inode(struct inode *inode)
253 inode->i_sb->dq_op->free_inode(inode, 1); 253 inode->i_sb->dq_op->free_inode(inode, 1);
254} 254}
255 255
256/* The following two functions cannot be called inside a transaction */ 256/* Cannot be called inside a transaction */
257static inline void vfs_dq_sync(struct super_block *sb)
258{
259 sync_dquots(sb, -1);
260}
261
262static inline int vfs_dq_off(struct super_block *sb, int remount) 257static inline int vfs_dq_off(struct super_block *sb, int remount)
263{ 258{
264 int ret = -ENOSYS; 259 int ret = -ENOSYS;
@@ -334,7 +329,7 @@ static inline void vfs_dq_free_inode(struct inode *inode)
334{ 329{
335} 330}
336 331
337static inline void vfs_dq_sync(struct super_block *sb) 332static inline void sync_quota_sb(struct super_block *sb, int type)
338{ 333{
339} 334}
340 335