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.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vfs.c b/fs/xfs/linux-2.6/xfs_vfs.c
index c855d62e5344..6f7c9f7a8624 100644
--- a/fs/xfs/linux-2.6/xfs_vfs.c
+++ b/fs/xfs/linux-2.6/xfs_vfs.c
@@ -227,7 +227,8 @@ vfs_freeze(
227} 227}
228 228
229vfs_t * 229vfs_t *
230vfs_allocate( void ) 230vfs_allocate(
231 struct super_block *sb)
231{ 232{
232 struct vfs *vfsp; 233 struct vfs *vfsp;
233 234
@@ -236,9 +237,23 @@ vfs_allocate( void )
236 INIT_LIST_HEAD(&vfsp->vfs_sync_list); 237 INIT_LIST_HEAD(&vfsp->vfs_sync_list);
237 spin_lock_init(&vfsp->vfs_sync_lock); 238 spin_lock_init(&vfsp->vfs_sync_lock);
238 init_waitqueue_head(&vfsp->vfs_wait_single_sync_task); 239 init_waitqueue_head(&vfsp->vfs_wait_single_sync_task);
240
241 vfsp->vfs_super = sb;
242 sb->s_fs_info = vfsp;
243
244 if (sb->s_flags & MS_RDONLY)
245 vfsp->vfs_flag |= VFS_RDONLY;
246
239 return vfsp; 247 return vfsp;
240} 248}
241 249
250vfs_t *
251vfs_from_sb(
252 struct super_block *sb)
253{
254 return (vfs_t *)sb->s_fs_info;
255}
256
242void 257void
243vfs_deallocate( 258vfs_deallocate(
244 struct vfs *vfsp) 259 struct vfs *vfsp)
@@ -295,7 +310,7 @@ bhv_remove_all_vfsops(
295 bhv_remove_vfsops(vfsp, VFS_POSITION_DM); 310 bhv_remove_vfsops(vfsp, VFS_POSITION_DM);
296 if (!freebase) 311 if (!freebase)
297 return; 312 return;
298 mp = XFS_BHVTOM(bhv_lookup(VFS_BHVHEAD(vfsp), &xfs_vfsops)); 313 mp = XFS_VFSTOM(vfsp);
299 VFS_REMOVEBHV(vfsp, &mp->m_bhv); 314 VFS_REMOVEBHV(vfsp, &mp->m_bhv);
300 xfs_mount_free(mp, 0); 315 xfs_mount_free(mp, 0);
301} 316}