aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_vfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vfs.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_vfs.c67
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
229vfs_deallocate( 228vfs_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
236void
237vfs_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
248void
249vfs_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
259void
260bhv_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
273void
274bhv_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
289void
290bhv_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}