summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_qmops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_qmops.c')
-rw-r--r--fs/xfs/xfs_qmops.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/fs/xfs/xfs_qmops.c b/fs/xfs/xfs_qmops.c
index c266a0184b4..2ec1d8a2735 100644
--- a/fs/xfs/xfs_qmops.c
+++ b/fs/xfs/xfs_qmops.c
@@ -135,19 +135,13 @@ int
xfs_qmops_get(struct xfs_mount *mp, struct xfs_mount_args *args)
{
if (args->flags & (XFSMNT_UQUOTA | XFSMNT_PQUOTA | XFSMNT_GQUOTA)) {
- struct xfs_qmops *ops;
-
- ops = symbol_get(xfs_qmcore_xfs);
- if (!ops) {
- request_module("xfs_quota");
- ops = symbol_get(xfs_qmcore_xfs);
- }
-
- if (!ops) {
- cmn_err(CE_WARN, "XFS: no quota support available.");
- return EINVAL;
- }
- mp->m_qm_ops = ops;
+#ifdef CONFIG_XFS_QUOTA
+ mp->m_qm_ops = &xfs_qmcore_xfs;
+#else
+ cmn_err(CE_WARN,
+ "XFS: qouta support not available in this kernel.");
+ return EINVAL;
+#endif
} else {
mp->m_qm_ops = &xfs_qmcore_stub;
}
@@ -158,6 +152,4 @@ xfs_qmops_get(struct xfs_mount *mp, struct xfs_mount_args *args)
void
xfs_qmops_put(struct xfs_mount *mp)
{
- if (mp->m_qm_ops != &xfs_qmcore_stub)
- symbol_put(xfs_qmcore_xfs);
}