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 <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
This commit is contained in:
Christoph Hellwig 2010-05-19 07:16:44 -04:00 • committed by Jan Kara
commit 123e9caf1e
7 changed files with 22 additions and 15 deletions

View file

@ -1045,7 +1045,11 @@ magic_found:
*/
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);