diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_dmops.c | 21 | ||||
-rw-r--r-- | fs/xfs/xfs_qmops.c | 22 |
2 files changed, 11 insertions, 32 deletions
diff --git a/fs/xfs/xfs_dmops.c b/fs/xfs/xfs_dmops.c index 6cd5704258a2..a1e55fb9d5dd 100644 --- a/fs/xfs/xfs_dmops.c +++ b/fs/xfs/xfs_dmops.c | |||
@@ -41,29 +41,16 @@ int | |||
41 | xfs_dmops_get(struct xfs_mount *mp, struct xfs_mount_args *args) | 41 | xfs_dmops_get(struct xfs_mount *mp, struct xfs_mount_args *args) |
42 | { | 42 | { |
43 | if (args->flags & XFSMNT_DMAPI) { | 43 | if (args->flags & XFSMNT_DMAPI) { |
44 | struct xfs_dmops *ops; | 44 | cmn_err(CE_WARN, |
45 | 45 | "XFS: dmapi support not available in this kernel."); | |
46 | ops = symbol_get(xfs_dmcore_xfs); | 46 | return EINVAL; |
47 | if (!ops) { | ||
48 | request_module("xfs_dmapi"); | ||
49 | ops = symbol_get(xfs_dmcore_xfs); | ||
50 | } | ||
51 | |||
52 | if (!ops) { | ||
53 | cmn_err(CE_WARN, "XFS: no dmapi support available."); | ||
54 | return EINVAL; | ||
55 | } | ||
56 | mp->m_dm_ops = ops; | ||
57 | } else { | ||
58 | mp->m_dm_ops = &xfs_dmcore_stub; | ||
59 | } | 47 | } |
60 | 48 | ||
49 | mp->m_dm_ops = &xfs_dmcore_stub; | ||
61 | return 0; | 50 | return 0; |
62 | } | 51 | } |
63 | 52 | ||
64 | void | 53 | void |
65 | xfs_dmops_put(struct xfs_mount *mp) | 54 | xfs_dmops_put(struct xfs_mount *mp) |
66 | { | 55 | { |
67 | if (mp->m_dm_ops != &xfs_dmcore_stub) | ||
68 | symbol_put(xfs_dmcore_xfs); | ||
69 | } | 56 | } |
diff --git a/fs/xfs/xfs_qmops.c b/fs/xfs/xfs_qmops.c index c266a0184b42..2ec1d8a27352 100644 --- a/fs/xfs/xfs_qmops.c +++ b/fs/xfs/xfs_qmops.c | |||
@@ -135,19 +135,13 @@ int | |||
135 | xfs_qmops_get(struct xfs_mount *mp, struct xfs_mount_args *args) | 135 | xfs_qmops_get(struct xfs_mount *mp, struct xfs_mount_args *args) |
136 | { | 136 | { |
137 | if (args->flags & (XFSMNT_UQUOTA | XFSMNT_PQUOTA | XFSMNT_GQUOTA)) { | 137 | if (args->flags & (XFSMNT_UQUOTA | XFSMNT_PQUOTA | XFSMNT_GQUOTA)) { |
138 | struct xfs_qmops *ops; | 138 | #ifdef CONFIG_XFS_QUOTA |
139 | 139 | mp->m_qm_ops = &xfs_qmcore_xfs; | |
140 | ops = symbol_get(xfs_qmcore_xfs); | 140 | #else |
141 | if (!ops) { | 141 | cmn_err(CE_WARN, |
142 | request_module("xfs_quota"); | 142 | "XFS: qouta support not available in this kernel."); |
143 | ops = symbol_get(xfs_qmcore_xfs); | 143 | return EINVAL; |
144 | } | 144 | #endif |
145 | |||
146 | if (!ops) { | ||
147 | cmn_err(CE_WARN, "XFS: no quota support available."); | ||
148 | return EINVAL; | ||
149 | } | ||
150 | mp->m_qm_ops = ops; | ||
151 | } else { | 145 | } else { |
152 | mp->m_qm_ops = &xfs_qmcore_stub; | 146 | mp->m_qm_ops = &xfs_qmcore_stub; |
153 | } | 147 | } |
@@ -158,6 +152,4 @@ xfs_qmops_get(struct xfs_mount *mp, struct xfs_mount_args *args) | |||
158 | void | 152 | void |
159 | xfs_qmops_put(struct xfs_mount *mp) | 153 | xfs_qmops_put(struct xfs_mount *mp) |
160 | { | 154 | { |
161 | if (mp->m_qm_ops != &xfs_qmcore_stub) | ||
162 | symbol_put(xfs_qmcore_xfs); | ||
163 | } | 155 | } |