diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-30 12:11:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-30 12:11:11 -0400 |
commit | d28619f1563140526e2f84eae436f39206f40a69 (patch) | |
tree | d93284016a0983c8f27b745a3c50738617e50995 /include/linux/quotaops.h | |
parent | 021fad8b706849c091f6e682bc5df3ce4f9ab4d7 (diff) | |
parent | f32764bd2bbb6ea003c158b1d276b4dc9f900348 (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
quota: Convert quota statistics to generic percpu_counter
ext3 uses rb_node = NULL; to zero rb_root.
quota: Fixup dquot_transfer
reiserfs: Fix resuming of quotas on remount read-write
pohmelfs: Remove dead quota code
ufs: Remove dead quota code
udf: Remove dead quota code
quota: rename default quotactl methods to dquot_
quota: explicitly set ->dq_op and ->s_qcop
quota: drop remount argument to ->quota_on and ->quota_off
quota: move unmount handling into the filesystem
quota: kill the vfs_dq_off and vfs_dq_quota_on_remount wrappers
quota: move remount handling into the filesystem
ocfs2: Fix use after free on remount read-only
Fix up conflicts in fs/ext4/super.c and fs/ufs/file.c
Diffstat (limited to 'include/linux/quotaops.h')
-rw-r--r-- | include/linux/quotaops.h | 79 |
1 files changed, 36 insertions, 43 deletions
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index e38ae53f3529..aa36793b48bd 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -53,6 +53,14 @@ int dquot_alloc_inode(const struct inode *inode); | |||
53 | int dquot_claim_space_nodirty(struct inode *inode, qsize_t number); | 53 | int dquot_claim_space_nodirty(struct inode *inode, qsize_t number); |
54 | void dquot_free_inode(const struct inode *inode); | 54 | void dquot_free_inode(const struct inode *inode); |
55 | 55 | ||
56 | int dquot_disable(struct super_block *sb, int type, unsigned int flags); | ||
57 | /* Suspend quotas on remount RO */ | ||
58 | static inline int dquot_suspend(struct super_block *sb, int type) | ||
59 | { | ||
60 | return dquot_disable(sb, type, DQUOT_SUSPENDED); | ||
61 | } | ||
62 | int dquot_resume(struct super_block *sb, int type); | ||
63 | |||
56 | int dquot_commit(struct dquot *dquot); | 64 | int dquot_commit(struct dquot *dquot); |
57 | int dquot_acquire(struct dquot *dquot); | 65 | int dquot_acquire(struct dquot *dquot); |
58 | int dquot_release(struct dquot *dquot); | 66 | int dquot_release(struct dquot *dquot); |
@@ -61,27 +69,25 @@ int dquot_mark_dquot_dirty(struct dquot *dquot); | |||
61 | 69 | ||
62 | int dquot_file_open(struct inode *inode, struct file *file); | 70 | int dquot_file_open(struct inode *inode, struct file *file); |
63 | 71 | ||
64 | int vfs_quota_on(struct super_block *sb, int type, int format_id, | 72 | int dquot_quota_on(struct super_block *sb, int type, int format_id, |
65 | char *path, int remount); | 73 | char *path); |
66 | int vfs_quota_enable(struct inode *inode, int type, int format_id, | 74 | int dquot_enable(struct inode *inode, int type, int format_id, |
67 | unsigned int flags); | 75 | unsigned int flags); |
68 | int vfs_quota_on_path(struct super_block *sb, int type, int format_id, | 76 | int dquot_quota_on_path(struct super_block *sb, int type, int format_id, |
69 | struct path *path); | 77 | struct path *path); |
70 | int vfs_quota_on_mount(struct super_block *sb, char *qf_name, | 78 | int dquot_quota_on_mount(struct super_block *sb, char *qf_name, |
71 | int format_id, int type); | 79 | int format_id, int type); |
72 | int vfs_quota_off(struct super_block *sb, int type, int remount); | 80 | int dquot_quota_off(struct super_block *sb, int type); |
73 | int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags); | 81 | int dquot_quota_sync(struct super_block *sb, int type, int wait); |
74 | int vfs_quota_sync(struct super_block *sb, int type, int wait); | 82 | int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
75 | int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 83 | int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
76 | int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 84 | int dquot_get_dqblk(struct super_block *sb, int type, qid_t id, |
77 | int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, | ||
78 | struct fs_disk_quota *di); | 85 | struct fs_disk_quota *di); |
79 | int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, | 86 | int dquot_set_dqblk(struct super_block *sb, int type, qid_t id, |
80 | struct fs_disk_quota *di); | 87 | struct fs_disk_quota *di); |
81 | 88 | ||
82 | int __dquot_transfer(struct inode *inode, struct dquot **transfer_to); | 89 | int __dquot_transfer(struct inode *inode, struct dquot **transfer_to); |
83 | int dquot_transfer(struct inode *inode, struct iattr *iattr); | 90 | int dquot_transfer(struct inode *inode, struct iattr *iattr); |
84 | int vfs_dq_quota_on_remount(struct super_block *sb); | ||
85 | 91 | ||
86 | static inline struct mem_dqinfo *sb_dqinfo(struct super_block *sb, int type) | 92 | static inline struct mem_dqinfo *sb_dqinfo(struct super_block *sb, int type) |
87 | { | 93 | { |
@@ -148,20 +154,7 @@ static inline unsigned sb_any_quota_active(struct super_block *sb) | |||
148 | * Operations supported for diskquotas. | 154 | * Operations supported for diskquotas. |
149 | */ | 155 | */ |
150 | extern const struct dquot_operations dquot_operations; | 156 | extern const struct dquot_operations dquot_operations; |
151 | extern const struct quotactl_ops vfs_quotactl_ops; | 157 | extern const struct quotactl_ops dquot_quotactl_ops; |
152 | |||
153 | #define sb_dquot_ops (&dquot_operations) | ||
154 | #define sb_quotactl_ops (&vfs_quotactl_ops) | ||
155 | |||
156 | /* Cannot be called inside a transaction */ | ||
157 | static inline int vfs_dq_off(struct super_block *sb, int remount) | ||
158 | { | ||
159 | int ret = -ENOSYS; | ||
160 | |||
161 | if (sb->s_qcop && sb->s_qcop->quota_off) | ||
162 | ret = sb->s_qcop->quota_off(sb, -1, remount); | ||
163 | return ret; | ||
164 | } | ||
165 | 158 | ||
166 | #else | 159 | #else |
167 | 160 | ||
@@ -206,12 +199,6 @@ static inline int sb_any_quota_active(struct super_block *sb) | |||
206 | return 0; | 199 | return 0; |
207 | } | 200 | } |
208 | 201 | ||
209 | /* | ||
210 | * NO-OP when quota not configured. | ||
211 | */ | ||
212 | #define sb_dquot_ops (NULL) | ||
213 | #define sb_quotactl_ops (NULL) | ||
214 | |||
215 | static inline void dquot_initialize(struct inode *inode) | 202 | static inline void dquot_initialize(struct inode *inode) |
216 | { | 203 | { |
217 | } | 204 | } |
@@ -229,16 +216,6 @@ static inline void dquot_free_inode(const struct inode *inode) | |||
229 | { | 216 | { |
230 | } | 217 | } |
231 | 218 | ||
232 | static inline int vfs_dq_off(struct super_block *sb, int remount) | ||
233 | { | ||
234 | return 0; | ||
235 | } | ||
236 | |||
237 | static inline int vfs_dq_quota_on_remount(struct super_block *sb) | ||
238 | { | ||
239 | return 0; | ||
240 | } | ||
241 | |||
242 | static inline int dquot_transfer(struct inode *inode, struct iattr *iattr) | 219 | static inline int dquot_transfer(struct inode *inode, struct iattr *iattr) |
243 | { | 220 | { |
244 | return 0; | 221 | return 0; |
@@ -265,6 +242,22 @@ static inline int dquot_claim_space_nodirty(struct inode *inode, qsize_t number) | |||
265 | return 0; | 242 | return 0; |
266 | } | 243 | } |
267 | 244 | ||
245 | static inline int dquot_disable(struct super_block *sb, int type, | ||
246 | unsigned int flags) | ||
247 | { | ||
248 | return 0; | ||
249 | } | ||
250 | |||
251 | static inline int dquot_suspend(struct super_block *sb, int type) | ||
252 | { | ||
253 | return 0; | ||
254 | } | ||
255 | |||
256 | static inline int dquot_resume(struct super_block *sb, int type) | ||
257 | { | ||
258 | return 0; | ||
259 | } | ||
260 | |||
268 | #define dquot_file_open generic_file_open | 261 | #define dquot_file_open generic_file_open |
269 | 262 | ||
270 | #endif /* CONFIG_QUOTA */ | 263 | #endif /* CONFIG_QUOTA */ |