Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Definitions for diskquota-operations. When diskquota is configured these |
| 3 | * macros expand to the right source-code. |
| 4 | * |
| 5 | * Author: Marco van Wieringen <mvw@planets.elm.net> |
| 6 | * |
| 7 | * Version: $Id: quotaops.h,v 1.2 1998/01/15 16:22:26 ecd Exp $ |
| 8 | * |
| 9 | */ |
| 10 | #ifndef _LINUX_QUOTAOPS_ |
| 11 | #define _LINUX_QUOTAOPS_ |
| 12 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | #include <linux/smp_lock.h> |
| 14 | |
| 15 | #include <linux/fs.h> |
| 16 | |
| 17 | #if defined(CONFIG_QUOTA) |
| 18 | |
| 19 | /* |
| 20 | * declaration of quota_function calls in kernel. |
| 21 | */ |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 22 | void sync_dquots(struct super_block *sb, int type); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 24 | int dquot_initialize(struct inode *inode, int type); |
| 25 | int dquot_drop(struct inode *inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 27 | int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); |
| 28 | int dquot_alloc_inode(const struct inode *inode, unsigned long number); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 30 | int dquot_free_space(struct inode *inode, qsize_t number); |
| 31 | int dquot_free_inode(const struct inode *inode, unsigned long number); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 33 | int dquot_transfer(struct inode *inode, struct iattr *iattr); |
| 34 | int dquot_commit(struct dquot *dquot); |
| 35 | int dquot_acquire(struct dquot *dquot); |
| 36 | int dquot_release(struct dquot *dquot); |
| 37 | int dquot_commit_info(struct super_block *sb, int type); |
| 38 | int dquot_mark_dquot_dirty(struct dquot *dquot); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 40 | int vfs_quota_on(struct super_block *sb, int type, int format_id, |
| 41 | char *path, int remount); |
| 42 | int vfs_quota_on_mount(struct super_block *sb, char *qf_name, |
| 43 | int format_id, int type); |
| 44 | int vfs_quota_off(struct super_block *sb, int type, int remount); |
| 45 | int vfs_quota_sync(struct super_block *sb, int type); |
| 46 | int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
| 47 | int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
| 48 | int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); |
| 49 | int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); |
| 50 | |
| 51 | void vfs_dq_drop(struct inode *inode); |
| 52 | int vfs_dq_transfer(struct inode *inode, struct iattr *iattr); |
| 53 | int vfs_dq_quota_on_remount(struct super_block *sb); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | |
| 55 | /* |
| 56 | * Operations supported for diskquotas. |
| 57 | */ |
| 58 | extern struct dquot_operations dquot_operations; |
| 59 | extern struct quotactl_ops vfs_quotactl_ops; |
| 60 | |
| 61 | #define sb_dquot_ops (&dquot_operations) |
| 62 | #define sb_quotactl_ops (&vfs_quotactl_ops) |
| 63 | |
| 64 | /* It is better to call this function outside of any transaction as it might |
| 65 | * need a lot of space in journal for dquot structure allocation. */ |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 66 | static inline void vfs_dq_init(struct inode *inode) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | { |
| 68 | BUG_ON(!inode->i_sb); |
| 69 | if (sb_any_quota_enabled(inode->i_sb) && !IS_NOQUOTA(inode)) |
| 70 | inode->i_sb->dq_op->initialize(inode, -1); |
| 71 | } |
| 72 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 73 | /* The following allocation/freeing/transfer functions *must* be called inside |
| 74 | * a transaction (deadlocks possible otherwise) */ |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 75 | static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | { |
| 77 | if (sb_any_quota_enabled(inode->i_sb)) { |
| 78 | /* Used space is updated in alloc_space() */ |
| 79 | if (inode->i_sb->dq_op->alloc_space(inode, nr, 1) == NO_QUOTA) |
| 80 | return 1; |
| 81 | } |
| 82 | else |
| 83 | inode_add_bytes(inode, nr); |
| 84 | return 0; |
| 85 | } |
| 86 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 87 | static inline int vfs_dq_prealloc_space(struct inode *inode, qsize_t nr) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 88 | { |
| 89 | int ret; |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 90 | if (!(ret = vfs_dq_prealloc_space_nodirty(inode, nr))) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 91 | mark_inode_dirty(inode); |
| 92 | return ret; |
| 93 | } |
| 94 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 95 | static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 96 | { |
| 97 | if (sb_any_quota_enabled(inode->i_sb)) { |
| 98 | /* Used space is updated in alloc_space() */ |
| 99 | if (inode->i_sb->dq_op->alloc_space(inode, nr, 0) == NO_QUOTA) |
| 100 | return 1; |
| 101 | } |
| 102 | else |
| 103 | inode_add_bytes(inode, nr); |
| 104 | return 0; |
| 105 | } |
| 106 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 107 | static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 108 | { |
| 109 | int ret; |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 110 | if (!(ret = vfs_dq_alloc_space_nodirty(inode, nr))) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 111 | mark_inode_dirty(inode); |
| 112 | return ret; |
| 113 | } |
| 114 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 115 | static inline int vfs_dq_alloc_inode(struct inode *inode) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 116 | { |
| 117 | if (sb_any_quota_enabled(inode->i_sb)) { |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 118 | vfs_dq_init(inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 119 | if (inode->i_sb->dq_op->alloc_inode(inode, 1) == NO_QUOTA) |
| 120 | return 1; |
| 121 | } |
| 122 | return 0; |
| 123 | } |
| 124 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 125 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 126 | { |
| 127 | if (sb_any_quota_enabled(inode->i_sb)) |
| 128 | inode->i_sb->dq_op->free_space(inode, nr); |
| 129 | else |
| 130 | inode_sub_bytes(inode, nr); |
| 131 | } |
| 132 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 133 | static inline void vfs_dq_free_space(struct inode *inode, qsize_t nr) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 134 | { |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 135 | vfs_dq_free_space_nodirty(inode, nr); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 136 | mark_inode_dirty(inode); |
| 137 | } |
| 138 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 139 | static inline void vfs_dq_free_inode(struct inode *inode) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | { |
| 141 | if (sb_any_quota_enabled(inode->i_sb)) |
| 142 | inode->i_sb->dq_op->free_inode(inode, 1); |
| 143 | } |
| 144 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 145 | /* The following two functions cannot be called inside a transaction */ |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 146 | static inline void vfs_dq_sync(struct super_block *sb) |
Jan Kara | 03f6e92 | 2008-04-28 02:14:32 -0700 | [diff] [blame] | 147 | { |
| 148 | sync_dquots(sb, -1); |
| 149 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 150 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 151 | static inline int vfs_dq_off(struct super_block *sb, int remount) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 152 | { |
| 153 | int ret = -ENOSYS; |
| 154 | |
Jan Kara | 0ff5af8 | 2008-04-28 02:14:33 -0700 | [diff] [blame] | 155 | if (sb->s_qcop && sb->s_qcop->quota_off) |
| 156 | ret = sb->s_qcop->quota_off(sb, -1, remount); |
| 157 | return ret; |
| 158 | } |
| 159 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 160 | #else |
| 161 | |
| 162 | /* |
| 163 | * NO-OP when quota not configured. |
| 164 | */ |
| 165 | #define sb_dquot_ops (NULL) |
| 166 | #define sb_quotactl_ops (NULL) |
Andrew Morton | 50f8c37 | 2008-04-28 02:14:35 -0700 | [diff] [blame] | 167 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 168 | static inline void vfs_dq_init(struct inode *inode) |
Andrew Morton | 50f8c37 | 2008-04-28 02:14:35 -0700 | [diff] [blame] | 169 | { |
| 170 | } |
| 171 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 172 | static inline void vfs_dq_drop(struct inode *inode) |
Andrew Morton | 50f8c37 | 2008-04-28 02:14:35 -0700 | [diff] [blame] | 173 | { |
| 174 | } |
| 175 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 176 | static inline int vfs_dq_alloc_inode(struct inode *inode) |
Andrew Morton | 50f8c37 | 2008-04-28 02:14:35 -0700 | [diff] [blame] | 177 | { |
| 178 | return 0; |
| 179 | } |
| 180 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 181 | static inline void vfs_dq_free_inode(struct inode *inode) |
Andrew Morton | 50f8c37 | 2008-04-28 02:14:35 -0700 | [diff] [blame] | 182 | { |
| 183 | } |
| 184 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 185 | static inline void vfs_dq_sync(struct super_block *sb) |
Andrew Morton | 50f8c37 | 2008-04-28 02:14:35 -0700 | [diff] [blame] | 186 | { |
| 187 | } |
| 188 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 189 | static inline int vfs_dq_off(struct super_block *sb, int remount) |
Andrew Morton | 50f8c37 | 2008-04-28 02:14:35 -0700 | [diff] [blame] | 190 | { |
| 191 | return 0; |
| 192 | } |
| 193 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 194 | static inline int vfs_dq_quota_on_remount(struct super_block *sb) |
Andrew Morton | 50f8c37 | 2008-04-28 02:14:35 -0700 | [diff] [blame] | 195 | { |
| 196 | return 0; |
| 197 | } |
| 198 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 199 | static inline int vfs_dq_transfer(struct inode *inode, struct iattr *iattr) |
Andrew Morton | 50f8c37 | 2008-04-28 02:14:35 -0700 | [diff] [blame] | 200 | { |
| 201 | return 0; |
| 202 | } |
| 203 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 204 | static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 205 | { |
| 206 | inode_add_bytes(inode, nr); |
| 207 | return 0; |
| 208 | } |
| 209 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 210 | static inline int vfs_dq_prealloc_space(struct inode *inode, qsize_t nr) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 211 | { |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 212 | vfs_dq_prealloc_space_nodirty(inode, nr); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 213 | mark_inode_dirty(inode); |
| 214 | return 0; |
| 215 | } |
| 216 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 217 | static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 218 | { |
| 219 | inode_add_bytes(inode, nr); |
| 220 | return 0; |
| 221 | } |
| 222 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 223 | static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 224 | { |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 225 | vfs_dq_alloc_space_nodirty(inode, nr); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 226 | mark_inode_dirty(inode); |
| 227 | return 0; |
| 228 | } |
| 229 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 230 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 231 | { |
| 232 | inode_sub_bytes(inode, nr); |
| 233 | } |
| 234 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 235 | static inline void vfs_dq_free_space(struct inode *inode, qsize_t nr) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 236 | { |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 237 | vfs_dq_free_space_nodirty(inode, nr); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 238 | mark_inode_dirty(inode); |
| 239 | } |
| 240 | |
| 241 | #endif /* CONFIG_QUOTA */ |
| 242 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 243 | static inline int vfs_dq_prealloc_block_nodirty(struct inode *inode, qsize_t nr) |
Jan Kara | 03f6e92 | 2008-04-28 02:14:32 -0700 | [diff] [blame] | 244 | { |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 245 | return vfs_dq_prealloc_space_nodirty(inode, |
Jan Kara | 03f6e92 | 2008-04-28 02:14:32 -0700 | [diff] [blame] | 246 | nr << inode->i_sb->s_blocksize_bits); |
| 247 | } |
| 248 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 249 | static inline int vfs_dq_prealloc_block(struct inode *inode, qsize_t nr) |
Jan Kara | 03f6e92 | 2008-04-28 02:14:32 -0700 | [diff] [blame] | 250 | { |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 251 | return vfs_dq_prealloc_space(inode, |
Jan Kara | 03f6e92 | 2008-04-28 02:14:32 -0700 | [diff] [blame] | 252 | nr << inode->i_sb->s_blocksize_bits); |
| 253 | } |
| 254 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 255 | static inline int vfs_dq_alloc_block_nodirty(struct inode *inode, qsize_t nr) |
Jan Kara | 03f6e92 | 2008-04-28 02:14:32 -0700 | [diff] [blame] | 256 | { |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 257 | return vfs_dq_alloc_space_nodirty(inode, |
Jan Kara | 03f6e92 | 2008-04-28 02:14:32 -0700 | [diff] [blame] | 258 | nr << inode->i_sb->s_blocksize_bits); |
| 259 | } |
| 260 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 261 | static inline int vfs_dq_alloc_block(struct inode *inode, qsize_t nr) |
Jan Kara | 03f6e92 | 2008-04-28 02:14:32 -0700 | [diff] [blame] | 262 | { |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 263 | return vfs_dq_alloc_space(inode, |
Jan Kara | 03f6e92 | 2008-04-28 02:14:32 -0700 | [diff] [blame] | 264 | nr << inode->i_sb->s_blocksize_bits); |
| 265 | } |
| 266 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 267 | static inline void vfs_dq_free_block_nodirty(struct inode *inode, qsize_t nr) |
Jan Kara | 03f6e92 | 2008-04-28 02:14:32 -0700 | [diff] [blame] | 268 | { |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 269 | vfs_dq_free_space_nodirty(inode, nr << inode->i_sb->s_blocksize_bits); |
Jan Kara | 03f6e92 | 2008-04-28 02:14:32 -0700 | [diff] [blame] | 270 | } |
| 271 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 272 | static inline void vfs_dq_free_block(struct inode *inode, qsize_t nr) |
Jan Kara | 03f6e92 | 2008-04-28 02:14:32 -0700 | [diff] [blame] | 273 | { |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 274 | vfs_dq_free_space(inode, nr << inode->i_sb->s_blocksize_bits); |
Jan Kara | 03f6e92 | 2008-04-28 02:14:32 -0700 | [diff] [blame] | 275 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 276 | |
Jan Kara | b85f4b8 | 2008-07-25 01:46:50 -0700 | [diff] [blame^] | 277 | /* |
| 278 | * Define uppercase equivalents for compatibility with old function names |
| 279 | * Can go away when we think all users have been converted (15/04/2008) |
| 280 | */ |
| 281 | #define DQUOT_INIT(inode) vfs_dq_init(inode) |
| 282 | #define DQUOT_DROP(inode) vfs_dq_drop(inode) |
| 283 | #define DQUOT_PREALLOC_SPACE_NODIRTY(inode, nr) \ |
| 284 | vfs_dq_prealloc_space_nodirty(inode, nr) |
| 285 | #define DQUOT_PREALLOC_SPACE(inode, nr) vfs_dq_prealloc_space(inode, nr) |
| 286 | #define DQUOT_ALLOC_SPACE_NODIRTY(inode, nr) \ |
| 287 | vfs_dq_alloc_space_nodirty(inode, nr) |
| 288 | #define DQUOT_ALLOC_SPACE(inode, nr) vfs_dq_alloc_space(inode, nr) |
| 289 | #define DQUOT_PREALLOC_BLOCK_NODIRTY(inode, nr) \ |
| 290 | vfs_dq_prealloc_block_nodirty(inode, nr) |
| 291 | #define DQUOT_PREALLOC_BLOCK(inode, nr) vfs_dq_prealloc_block(inode, nr) |
| 292 | #define DQUOT_ALLOC_BLOCK_NODIRTY(inode, nr) \ |
| 293 | vfs_dq_alloc_block_nodirty(inode, nr) |
| 294 | #define DQUOT_ALLOC_BLOCK(inode, nr) vfs_dq_alloc_block(inode, nr) |
| 295 | #define DQUOT_ALLOC_INODE(inode) vfs_dq_alloc_inode(inode) |
| 296 | #define DQUOT_FREE_SPACE_NODIRTY(inode, nr) \ |
| 297 | vfs_dq_free_space_nodirty(inode, nr) |
| 298 | #define DQUOT_FREE_SPACE(inode, nr) vfs_dq_free_space(inode, nr) |
| 299 | #define DQUOT_FREE_BLOCK_NODIRTY(inode, nr) \ |
| 300 | vfs_dq_free_block_nodirty(inode, nr) |
| 301 | #define DQUOT_FREE_BLOCK(inode, nr) vfs_dq_free_block(inode, nr) |
| 302 | #define DQUOT_FREE_INODE(inode) vfs_dq_free_inode(inode) |
| 303 | #define DQUOT_TRANSFER(inode, iattr) vfs_dq_transfer(inode, iattr) |
| 304 | #define DQUOT_SYNC(sb) vfs_dq_sync(sb) |
| 305 | #define DQUOT_OFF(sb, remount) vfs_dq_off(sb, remount) |
| 306 | #define DQUOT_ON_REMOUNT(sb) vfs_dq_quota_on_remount(sb) |
| 307 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 308 | #endif /* _LINUX_QUOTAOPS_ */ |