diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-08-30 03:20:39 -0400 |
---|---|---|
committer | Tim Shimmin <tes@chook.melbourne.sgi.com> | 2007-10-15 21:44:08 -0400 |
commit | 745f691912b700ac98607b525f3c892204c7f12f (patch) | |
tree | 4988bdf45dec4bc9bffd432fc3e521b73836172f /fs/xfs/linux-2.6/xfs_vfs.c | |
parent | 48c872a9f3ec4cdc37801aae9ef16c80026503ea (diff) |
[XFS] call common xfs vfs-level helpers directly and remove vfs operations
Also remove the now dead behavior code.
SGI-PV: 969608
SGI-Modid: xfs-linux-melb:xfs-kern:29505a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vfs.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vfs.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vfs.c b/fs/xfs/linux-2.6/xfs_vfs.c index 5f616ccaea8d..573e52a24072 100644 --- a/fs/xfs/linux-2.6/xfs_vfs.c +++ b/fs/xfs/linux-2.6/xfs_vfs.c | |||
@@ -204,7 +204,6 @@ vfs_allocate( | |||
204 | struct bhv_vfs *vfsp; | 204 | struct bhv_vfs *vfsp; |
205 | 205 | ||
206 | vfsp = kmem_zalloc(sizeof(bhv_vfs_t), KM_SLEEP); | 206 | vfsp = kmem_zalloc(sizeof(bhv_vfs_t), KM_SLEEP); |
207 | bhv_head_init(VFS_BHVHEAD(vfsp), "vfs"); | ||
208 | INIT_LIST_HEAD(&vfsp->vfs_sync_list); | 207 | INIT_LIST_HEAD(&vfsp->vfs_sync_list); |
209 | spin_lock_init(&vfsp->vfs_sync_lock); | 208 | spin_lock_init(&vfsp->vfs_sync_lock); |
210 | init_waitqueue_head(&vfsp->vfs_wait_single_sync_task); | 209 | init_waitqueue_head(&vfsp->vfs_wait_single_sync_task); |
@@ -229,71 +228,5 @@ void | |||
229 | vfs_deallocate( | 228 | vfs_deallocate( |
230 | struct bhv_vfs *vfsp) | 229 | struct bhv_vfs *vfsp) |
231 | { | 230 | { |
232 | bhv_head_destroy(VFS_BHVHEAD(vfsp)); | ||
233 | kmem_free(vfsp, sizeof(bhv_vfs_t)); | 231 | kmem_free(vfsp, sizeof(bhv_vfs_t)); |
234 | } | 232 | } |
235 | |||
236 | void | ||
237 | vfs_insertops( | ||
238 | struct bhv_vfs *vfsp, | ||
239 | struct bhv_module_vfsops *vfsops) | ||
240 | { | ||
241 | struct bhv_desc *bdp; | ||
242 | |||
243 | bdp = kmem_alloc(sizeof(struct bhv_desc), KM_SLEEP); | ||
244 | bhv_desc_init(bdp, NULL, vfsp, vfsops); | ||
245 | bhv_insert(&vfsp->vfs_bh, bdp); | ||
246 | } | ||
247 | |||
248 | void | ||
249 | vfs_insertbhv( | ||
250 | struct bhv_vfs *vfsp, | ||
251 | struct bhv_desc *bdp, | ||
252 | struct bhv_vfsops *vfsops, | ||
253 | void *mount) | ||
254 | { | ||
255 | bhv_desc_init(bdp, mount, vfsp, vfsops); | ||
256 | bhv_insert_initial(&vfsp->vfs_bh, bdp); | ||
257 | } | ||
258 | |||
259 | void | ||
260 | bhv_remove_vfsops( | ||
261 | struct bhv_vfs *vfsp, | ||
262 | int pos) | ||
263 | { | ||
264 | struct bhv_desc *bhv; | ||
265 | |||
266 | bhv = bhv_lookup_range(&vfsp->vfs_bh, pos, pos); | ||
267 | if (!bhv) | ||
268 | return; | ||
269 | bhv_remove(&vfsp->vfs_bh, bhv); | ||
270 | kmem_free(bhv, sizeof(*bhv)); | ||
271 | } | ||
272 | |||
273 | void | ||
274 | bhv_remove_all_vfsops( | ||
275 | struct bhv_vfs *vfsp, | ||
276 | int freebase) | ||
277 | { | ||
278 | struct xfs_mount *mp; | ||
279 | |||
280 | bhv_remove_vfsops(vfsp, VFS_POSITION_QM); | ||
281 | if (!freebase) | ||
282 | return; | ||
283 | mp = XFS_VFSTOM(vfsp); | ||
284 | VFS_REMOVEBHV(vfsp, &mp->m_bhv); | ||
285 | xfs_mount_free(mp, 0); | ||
286 | kmem_free(mp, sizeof(xfs_mount_t)); | ||
287 | } | ||
288 | |||
289 | void | ||
290 | bhv_insert_all_vfsops( | ||
291 | struct bhv_vfs *vfsp) | ||
292 | { | ||
293 | struct xfs_mount *mp; | ||
294 | |||
295 | mp = xfs_mount_init(); | ||
296 | vfs_insertbhv(vfsp, &mp->m_bhv, &xfs_vfsops, mp); | ||
297 | vfs_insertdmapi(vfsp); | ||
298 | vfs_insertquota(vfsp); | ||
299 | } | ||