summaryrefslogtreecommitdiff
path: root/fs/ext2
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-05-19 07:16:44 -0400
committerJan Kara <jack@suse.cz>2010-05-24 14:10:17 +0200
commit123e9caf1e85008ab7eb5f6cd58c44f9a5d73b2b (patch)
treea7a49a9aabb2136e8d19a3d86096bb525a16e0b9 /fs/ext2
parent307ae18a56e5b706056a2050d52e8cc01b5171c0 (diff)
downloadlinux-3.10-123e9caf1e85008ab7eb5f6cd58c44f9a5d73b2b.tar.gz
linux-3.10-123e9caf1e85008ab7eb5f6cd58c44f9a5d73b2b.tar.bz2
linux-3.10-123e9caf1e85008ab7eb5f6cd58c44f9a5d73b2b.zip
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>
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/super.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index b9b77c3e7ae..df752b71b86 100644
--- a/fs/ext2/super.c
+++ b/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);