From 4fda7c50ecb39a95055c5c69c22b9b07d8dd5409 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 19 May 2010 07:16:44 -0400 Subject: [PATCH] --- yaml --- r: 199351 b: refs/heads/master c: 123e9caf1e85008ab7eb5f6cd58c44f9a5d73b2b h: refs/heads/master i: 199349: a5863705cce66a0c6cc54c9b35f4b7c59086af87 199347: 46cd5a72423b88726efd11da35730f0b61abd692 199343: 958306682d7b8acee95fe2e348e745c46e9af8d7 v: v3 --- [refs] | 2 +- trunk/fs/ext2/super.c | 6 ++++++ trunk/fs/jfs/super.c | 4 ++++ trunk/fs/quota/dquot.c | 3 ++- trunk/fs/super.c | 3 --- trunk/fs/udf/super.c | 6 +++++- trunk/fs/ufs/super.c | 6 +++++- trunk/include/linux/quotaops.h | 9 --------- 8 files changed, 23 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index 1abbeb6e6193..57429100d5ae 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 307ae18a56e5b706056a2050d52e8cc01b5171c0 +refs/heads/master: 123e9caf1e85008ab7eb5f6cd58c44f9a5d73b2b diff --git a/trunk/fs/ext2/super.c b/trunk/fs/ext2/super.c index b9b77c3e7ae0..df752b71b869 100644 --- a/trunk/fs/ext2/super.c +++ b/trunk/fs/ext2/super.c @@ -1065,6 +1065,12 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) sb->s_op = &ext2_sops; sb->s_export_op = &ext2_export_ops; sb->s_xattr = ext2_xattr_handlers; + +#ifdef CONFIG_QUOTA + sb->dq_op = &dquot_operations; + sb->s_qcop = &vfs_quotactl_ops; +#endif + root = ext2_iget(sb, EXT2_ROOT_INO); if (IS_ERR(root)) { ret = PTR_ERR(root); diff --git a/trunk/fs/jfs/super.c b/trunk/fs/jfs/super.c index 7d940a3a3d93..2e7ec5e8cda4 100644 --- a/trunk/fs/jfs/super.c +++ b/trunk/fs/jfs/super.c @@ -481,6 +481,10 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) */ sb->s_op = &jfs_super_operations; sb->s_export_op = &jfs_export_operations; +#ifdef CONFIG_QUOTA + sb->dq_op = &dquot_operations; + sb->s_qcop = &vfs_quotactl_ops; +#endif /* * Initialize direct-mapping inode/address-space diff --git a/trunk/fs/quota/dquot.c b/trunk/fs/quota/dquot.c index b84422657f6d..9ba526e3f719 100644 --- a/trunk/fs/quota/dquot.c +++ b/trunk/fs/quota/dquot.c @@ -1847,6 +1847,7 @@ const struct dquot_operations dquot_operations = { .alloc_dquot = dquot_alloc, .destroy_dquot = dquot_destroy, }; +EXPORT_SYMBOL(dquot_operations); /* * Generic helper for ->open on filesystems supporting disk quotas. @@ -2491,7 +2492,7 @@ const struct quotactl_ops vfs_quotactl_ops = { .get_dqblk = vfs_get_dqblk, .set_dqblk = vfs_set_dqblk }; - +EXPORT_SYMBOL(vfs_quotactl_ops); static int do_proc_dqstats(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) diff --git a/trunk/fs/super.c b/trunk/fs/super.c index 05f62e5d464d..af9fd02185aa 100644 --- a/trunk/fs/super.c +++ b/trunk/fs/super.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include /* for the emergency remount stuff */ @@ -94,8 +93,6 @@ static struct super_block *alloc_super(struct file_system_type *type) init_rwsem(&s->s_dquot.dqptr_sem); init_waitqueue_head(&s->s_wait_unfrozen); s->s_maxbytes = MAX_NON_LFS; - s->dq_op = sb_dquot_ops; - s->s_qcop = sb_quotactl_ops; s->s_op = &default_op; s->s_time_gran = 1000000000; } diff --git a/trunk/fs/udf/super.c b/trunk/fs/udf/super.c index 76a61566f299..ef9221b7456e 100644 --- a/trunk/fs/udf/super.c +++ b/trunk/fs/udf/super.c @@ -1948,7 +1948,11 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent) /* Fill in the rest of the superblock */ sb->s_op = &udf_sb_ops; sb->s_export_op = &udf_export_ops; - sb->dq_op = NULL; +#ifdef CONFIG_QUOTA + sb->s_qcop = &vfs_quotactl_ops; + sb->dq_op = NULL; /* &dquot_operations */ +#endif + sb->s_dirt = 0; sb->s_magic = UDF_SUPER_MAGIC; sb->s_time_gran = 1000; diff --git a/trunk/fs/ufs/super.c b/trunk/fs/ufs/super.c index d3977c7128e3..60c989b7012f 100644 --- a/trunk/fs/ufs/super.c +++ b/trunk/fs/ufs/super.c @@ -1045,7 +1045,11 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) */ sb->s_op = &ufs_super_ops; sb->s_export_op = &ufs_export_ops; - sb->dq_op = NULL; /***/ +#ifdef CONFIG_QUOTA + sb->s_qcop = &vfs_quotactl_ops; + sb->dq_op = NULL; /* &dquot_operations */ +#endif + sb->s_magic = fs32_to_cpu(sb, usb3->fs_magic); uspi->s_sblkno = fs32_to_cpu(sb, usb1->fs_sblkno); diff --git a/trunk/include/linux/quotaops.h b/trunk/include/linux/quotaops.h index a6592ddc349f..84b8dbf59c03 100644 --- a/trunk/include/linux/quotaops.h +++ b/trunk/include/linux/quotaops.h @@ -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) { }