quota: explicitly set ->dq_op and ->s_qcop

Only set the quota operation vectors if the filesystem actually supports
quota instead of doing it for all filesystems in alloc_super().

[Jan Kara: Export dquot_operations and vfs_quotactl_ops]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Christoph Hellwig 2010-05-19 07:16:44 -04:00 committed by Jan Kara
parent 307ae18a56
commit 123e9caf1e
7 changed files with 22 additions and 15 deletions

View file

@ -153,9 +153,6 @@ static inline unsigned sb_any_quota_active(struct super_block *sb)
extern const struct dquot_operations dquot_operations;
extern const struct quotactl_ops vfs_quotactl_ops;
#define sb_dquot_ops (&dquot_operations)
#define sb_quotactl_ops (&vfs_quotactl_ops)
#else
static inline int sb_has_quota_usage_enabled(struct super_block *sb, int type)
@ -199,12 +196,6 @@ static inline int sb_any_quota_active(struct super_block *sb)
return 0;
}
/*
* NO-OP when quota not configured.
*/
#define sb_dquot_ops (NULL)
#define sb_quotactl_ops (NULL)
static inline void dquot_initialize(struct inode *inode)
{
}