diff options
Diffstat (limited to 'include/linux/quotaops.h')
-rw-r--r-- | include/linux/quotaops.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 3ebb23153640..a529d86e7e73 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -26,6 +26,10 @@ static inline void writeout_quota_sb(struct super_block *sb, int type) | |||
26 | sb->s_qcop->quota_sync(sb, type); | 26 | sb->s_qcop->quota_sync(sb, type); |
27 | } | 27 | } |
28 | 28 | ||
29 | void inode_add_rsv_space(struct inode *inode, qsize_t number); | ||
30 | void inode_claim_rsv_space(struct inode *inode, qsize_t number); | ||
31 | void inode_sub_rsv_space(struct inode *inode, qsize_t number); | ||
32 | |||
29 | int dquot_initialize(struct inode *inode, int type); | 33 | int dquot_initialize(struct inode *inode, int type); |
30 | int dquot_drop(struct inode *inode); | 34 | int dquot_drop(struct inode *inode); |
31 | struct dquot *dqget(struct super_block *sb, unsigned int id, int type); | 35 | struct dquot *dqget(struct super_block *sb, unsigned int id, int type); |
@@ -42,7 +46,6 @@ int dquot_alloc_inode(const struct inode *inode, qsize_t number); | |||
42 | int dquot_reserve_space(struct inode *inode, qsize_t number, int prealloc); | 46 | int dquot_reserve_space(struct inode *inode, qsize_t number, int prealloc); |
43 | int dquot_claim_space(struct inode *inode, qsize_t number); | 47 | int dquot_claim_space(struct inode *inode, qsize_t number); |
44 | void dquot_release_reserved_space(struct inode *inode, qsize_t number); | 48 | void dquot_release_reserved_space(struct inode *inode, qsize_t number); |
45 | qsize_t dquot_get_reserved_space(struct inode *inode); | ||
46 | 49 | ||
47 | int dquot_free_space(struct inode *inode, qsize_t number); | 50 | int dquot_free_space(struct inode *inode, qsize_t number); |
48 | int dquot_free_inode(const struct inode *inode, qsize_t number); | 51 | int dquot_free_inode(const struct inode *inode, qsize_t number); |
@@ -199,6 +202,8 @@ static inline int vfs_dq_reserve_space(struct inode *inode, qsize_t nr) | |||
199 | if (inode->i_sb->dq_op->reserve_space(inode, nr, 0) == NO_QUOTA) | 202 | if (inode->i_sb->dq_op->reserve_space(inode, nr, 0) == NO_QUOTA) |
200 | return 1; | 203 | return 1; |
201 | } | 204 | } |
205 | else | ||
206 | inode_add_rsv_space(inode, nr); | ||
202 | return 0; | 207 | return 0; |
203 | } | 208 | } |
204 | 209 | ||
@@ -221,7 +226,7 @@ static inline int vfs_dq_claim_space(struct inode *inode, qsize_t nr) | |||
221 | if (inode->i_sb->dq_op->claim_space(inode, nr) == NO_QUOTA) | 226 | if (inode->i_sb->dq_op->claim_space(inode, nr) == NO_QUOTA) |
222 | return 1; | 227 | return 1; |
223 | } else | 228 | } else |
224 | inode_add_bytes(inode, nr); | 229 | inode_claim_rsv_space(inode, nr); |
225 | 230 | ||
226 | mark_inode_dirty(inode); | 231 | mark_inode_dirty(inode); |
227 | return 0; | 232 | return 0; |
@@ -235,6 +240,8 @@ void vfs_dq_release_reservation_space(struct inode *inode, qsize_t nr) | |||
235 | { | 240 | { |
236 | if (sb_any_quota_active(inode->i_sb)) | 241 | if (sb_any_quota_active(inode->i_sb)) |
237 | inode->i_sb->dq_op->release_rsv(inode, nr); | 242 | inode->i_sb->dq_op->release_rsv(inode, nr); |
243 | else | ||
244 | inode_sub_rsv_space(inode, nr); | ||
238 | } | 245 | } |
239 | 246 | ||
240 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) | 247 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) |