Commit c8fcfac5 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Tim Shimmin

[XFS] fixups after behavior removal merge into mainline git

Fixup for lack of dmapi support and no quota module support.

SGI-PV: 969985
Signed-off-by: default avatarChristoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarTim Shimmin <tes@sgi.com>
parent 4fa4d23f
...@@ -41,29 +41,16 @@ int ...@@ -41,29 +41,16 @@ int
xfs_dmops_get(struct xfs_mount *mp, struct xfs_mount_args *args) xfs_dmops_get(struct xfs_mount *mp, struct xfs_mount_args *args)
{ {
if (args->flags & XFSMNT_DMAPI) { if (args->flags & XFSMNT_DMAPI) {
struct xfs_dmops *ops; cmn_err(CE_WARN,
"XFS: dmapi support not available in this kernel.");
ops = symbol_get(xfs_dmcore_xfs); return EINVAL;
if (!ops) {
request_module("xfs_dmapi");
ops = symbol_get(xfs_dmcore_xfs);
}
if (!ops) {
cmn_err(CE_WARN, "XFS: no dmapi support available.");
return EINVAL;
}
mp->m_dm_ops = ops;
} else {
mp->m_dm_ops = &xfs_dmcore_stub;
} }
mp->m_dm_ops = &xfs_dmcore_stub;
return 0; return 0;
} }
void void
xfs_dmops_put(struct xfs_mount *mp) xfs_dmops_put(struct xfs_mount *mp)
{ {
if (mp->m_dm_ops != &xfs_dmcore_stub)
symbol_put(xfs_dmcore_xfs);
} }
...@@ -135,19 +135,13 @@ int ...@@ -135,19 +135,13 @@ int
xfs_qmops_get(struct xfs_mount *mp, struct xfs_mount_args *args) xfs_qmops_get(struct xfs_mount *mp, struct xfs_mount_args *args)
{ {
if (args->flags & (XFSMNT_UQUOTA | XFSMNT_PQUOTA | XFSMNT_GQUOTA)) { if (args->flags & (XFSMNT_UQUOTA | XFSMNT_PQUOTA | XFSMNT_GQUOTA)) {
struct xfs_qmops *ops; #ifdef CONFIG_XFS_QUOTA
mp->m_qm_ops = &xfs_qmcore_xfs;
ops = symbol_get(xfs_qmcore_xfs); #else
if (!ops) { cmn_err(CE_WARN,
request_module("xfs_quota"); "XFS: qouta support not available in this kernel.");
ops = symbol_get(xfs_qmcore_xfs); return EINVAL;
} #endif
if (!ops) {
cmn_err(CE_WARN, "XFS: no quota support available.");
return EINVAL;
}
mp->m_qm_ops = ops;
} else { } else {
mp->m_qm_ops = &xfs_qmcore_stub; mp->m_qm_ops = &xfs_qmcore_stub;
} }
...@@ -158,6 +152,4 @@ xfs_qmops_get(struct xfs_mount *mp, struct xfs_mount_args *args) ...@@ -158,6 +152,4 @@ xfs_qmops_get(struct xfs_mount *mp, struct xfs_mount_args *args)
void void
xfs_qmops_put(struct xfs_mount *mp) xfs_qmops_put(struct xfs_mount *mp)
{ {
if (mp->m_qm_ops != &xfs_qmcore_stub)
symbol_put(xfs_qmcore_xfs);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment