diff options
Diffstat (limited to 'fs/quota.c')
-rw-r--r-- | fs/quota.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/quota.c b/fs/quota.c index b7fe44e01618..4a8c94f05f76 100644 --- a/fs/quota.c +++ b/fs/quota.c | |||
@@ -73,7 +73,7 @@ static int generic_quotactl_valid(struct super_block *sb, int type, int cmd, qid | |||
73 | case Q_SETQUOTA: | 73 | case Q_SETQUOTA: |
74 | case Q_GETQUOTA: | 74 | case Q_GETQUOTA: |
75 | /* This is just informative test so we are satisfied without a lock */ | 75 | /* This is just informative test so we are satisfied without a lock */ |
76 | if (!sb_has_quota_enabled(sb, type)) | 76 | if (!sb_has_quota_active(sb, type)) |
77 | return -ESRCH; | 77 | return -ESRCH; |
78 | } | 78 | } |
79 | 79 | ||
@@ -160,6 +160,9 @@ static void quota_sync_sb(struct super_block *sb, int type) | |||
160 | int cnt; | 160 | int cnt; |
161 | 161 | ||
162 | sb->s_qcop->quota_sync(sb, type); | 162 | sb->s_qcop->quota_sync(sb, type); |
163 | |||
164 | if (sb_dqopt(sb)->flags & DQUOT_QUOTA_SYS_FILE) | ||
165 | return; | ||
163 | /* This is not very clever (and fast) but currently I don't know about | 166 | /* This is not very clever (and fast) but currently I don't know about |
164 | * any other simple way of getting quota data to disk and we must get | 167 | * any other simple way of getting quota data to disk and we must get |
165 | * them there for userspace to be visible... */ | 168 | * them there for userspace to be visible... */ |
@@ -175,7 +178,7 @@ static void quota_sync_sb(struct super_block *sb, int type) | |||
175 | for (cnt = 0; cnt < MAXQUOTAS; cnt++) { | 178 | for (cnt = 0; cnt < MAXQUOTAS; cnt++) { |
176 | if (type != -1 && cnt != type) | 179 | if (type != -1 && cnt != type) |
177 | continue; | 180 | continue; |
178 | if (!sb_has_quota_enabled(sb, cnt)) | 181 | if (!sb_has_quota_active(sb, cnt)) |
179 | continue; | 182 | continue; |
180 | mutex_lock_nested(&sb_dqopt(sb)->files[cnt]->i_mutex, I_MUTEX_QUOTA); | 183 | mutex_lock_nested(&sb_dqopt(sb)->files[cnt]->i_mutex, I_MUTEX_QUOTA); |
181 | truncate_inode_pages(&sb_dqopt(sb)->files[cnt]->i_data, 0); | 184 | truncate_inode_pages(&sb_dqopt(sb)->files[cnt]->i_data, 0); |
@@ -201,7 +204,7 @@ restart: | |||
201 | for (cnt = 0; cnt < MAXQUOTAS; cnt++) { | 204 | for (cnt = 0; cnt < MAXQUOTAS; cnt++) { |
202 | if (type != -1 && type != cnt) | 205 | if (type != -1 && type != cnt) |
203 | continue; | 206 | continue; |
204 | if (!sb_has_quota_enabled(sb, cnt)) | 207 | if (!sb_has_quota_active(sb, cnt)) |
205 | continue; | 208 | continue; |
206 | if (!info_dirty(&sb_dqopt(sb)->info[cnt]) && | 209 | if (!info_dirty(&sb_dqopt(sb)->info[cnt]) && |
207 | list_empty(&sb_dqopt(sb)->info[cnt].dqi_dirty_list)) | 210 | list_empty(&sb_dqopt(sb)->info[cnt].dqi_dirty_list)) |
@@ -245,7 +248,7 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, void | |||
245 | __u32 fmt; | 248 | __u32 fmt; |
246 | 249 | ||
247 | down_read(&sb_dqopt(sb)->dqptr_sem); | 250 | down_read(&sb_dqopt(sb)->dqptr_sem); |
248 | if (!sb_has_quota_enabled(sb, type)) { | 251 | if (!sb_has_quota_active(sb, type)) { |
249 | up_read(&sb_dqopt(sb)->dqptr_sem); | 252 | up_read(&sb_dqopt(sb)->dqptr_sem); |
250 | return -ESRCH; | 253 | return -ESRCH; |
251 | } | 254 | } |