Skip to content

Commit

Permalink
[XFS] fixups after behavior removal merge into mainline git
Browse files Browse the repository at this point in the history
Fixup for lack of dmapi support and no quota module support.

SGI-PV: 969985

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
  • Loading branch information
Christoph Hellwig authored and Tim Shimmin committed Oct 19, 2007
1 parent 4fa4d23 commit c8fcfac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 32 deletions.
21 changes: 4 additions & 17 deletions fs/xfs/xfs_dmops.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,16 @@ int
xfs_dmops_get(struct xfs_mount *mp, struct xfs_mount_args *args)
{
if (args->flags & XFSMNT_DMAPI) {
struct xfs_dmops *ops;

ops = symbol_get(xfs_dmcore_xfs);
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;
cmn_err(CE_WARN,
"XFS: dmapi support not available in this kernel.");
return EINVAL;
}

mp->m_dm_ops = &xfs_dmcore_stub;
return 0;
}

void
xfs_dmops_put(struct xfs_mount *mp)
{
if (mp->m_dm_ops != &xfs_dmcore_stub)
symbol_put(xfs_dmcore_xfs);
}
22 changes: 7 additions & 15 deletions fs/xfs/xfs_qmops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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);
}

0 comments on commit c8fcfac

Please sign in to comment.