aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
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 /fs/gfs2
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 'fs/gfs2')
-rw-r--r--fs/gfs2/quota.c4
-rw-r--r--fs/gfs2/quota.h2
-rw-r--r--fs/gfs2/super.c2
-rw-r--r--fs/gfs2/sys.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index b97178e7d397..27b5cc7d6881 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1108,7 +1108,7 @@ void gfs2_quota_change(struct gfs2_inode *ip, s64 change,
1108 } 1108 }
1109} 1109}
1110 1110
1111int gfs2_quota_sync(struct super_block *sb, int type, int wait) 1111int gfs2_quota_sync(struct super_block *sb, int type)
1112{ 1112{
1113 struct gfs2_sbd *sdp = sb->s_fs_info; 1113 struct gfs2_sbd *sdp = sb->s_fs_info;
1114 struct gfs2_quota_data **qda; 1114 struct gfs2_quota_data **qda;
@@ -1154,7 +1154,7 @@ int gfs2_quota_sync(struct super_block *sb, int type, int wait)
1154 1154
1155static int gfs2_quota_sync_timeo(struct super_block *sb, int type) 1155static int gfs2_quota_sync_timeo(struct super_block *sb, int type)
1156{ 1156{
1157 return gfs2_quota_sync(sb, type, 0); 1157 return gfs2_quota_sync(sb, type);
1158} 1158}
1159 1159
1160int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, u32 id) 1160int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, u32 id)
diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h
index 90bf1c302a98..f25d98b87904 100644
--- a/fs/gfs2/quota.h
+++ b/fs/gfs2/quota.h
@@ -26,7 +26,7 @@ extern int gfs2_quota_check(struct gfs2_inode *ip, u32 uid, u32 gid);
26extern void gfs2_quota_change(struct gfs2_inode *ip, s64 change, 26extern void gfs2_quota_change(struct gfs2_inode *ip, s64 change,
27 u32 uid, u32 gid); 27 u32 uid, u32 gid);
28 28
29extern int gfs2_quota_sync(struct super_block *sb, int type, int wait); 29extern int gfs2_quota_sync(struct super_block *sb, int type);
30extern int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, u32 id); 30extern int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, u32 id);
31 31
32extern int gfs2_quota_init(struct gfs2_sbd *sdp); 32extern int gfs2_quota_init(struct gfs2_sbd *sdp);
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 713e621c240b..313c329490e2 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -838,7 +838,7 @@ static int gfs2_make_fs_ro(struct gfs2_sbd *sdp)
838 int error; 838 int error;
839 839
840 flush_workqueue(gfs2_delete_workqueue); 840 flush_workqueue(gfs2_delete_workqueue);
841 gfs2_quota_sync(sdp->sd_vfs, 0, 1); 841 gfs2_quota_sync(sdp->sd_vfs, 0);
842 gfs2_statfs_sync(sdp->sd_vfs, 0); 842 gfs2_statfs_sync(sdp->sd_vfs, 0);
843 843
844 error = gfs2_glock_nq_init(sdp->sd_trans_gl, LM_ST_SHARED, GL_NOCACHE, 844 error = gfs2_glock_nq_init(sdp->sd_trans_gl, LM_ST_SHARED, GL_NOCACHE,
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
index 9c2592b1d5ff..73ecc34c4342 100644
--- a/fs/gfs2/sys.c
+++ b/fs/gfs2/sys.c
@@ -168,7 +168,7 @@ static ssize_t quota_sync_store(struct gfs2_sbd *sdp, const char *buf,
168 if (simple_strtol(buf, NULL, 0) != 1) 168 if (simple_strtol(buf, NULL, 0) != 1)
169 return -EINVAL; 169 return -EINVAL;
170 170
171 gfs2_quota_sync(sdp->sd_vfs, 0, 1); 171 gfs2_quota_sync(sdp->sd_vfs, 0);
172 return len; 172 return len;
173} 173}
174 174