diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vfs.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vfs.c | 19 |
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 | ||
229 | vfs_t * | 229 | vfs_t * |
230 | vfs_allocate( void ) | 230 | vfs_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 | ||
250 | vfs_t * | ||
251 | vfs_from_sb( | ||
252 | struct super_block *sb) | ||
253 | { | ||
254 | return (vfs_t *)sb->s_fs_info; | ||
255 | } | ||
256 | |||
242 | void | 257 | void |
243 | vfs_deallocate( | 258 | vfs_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 | } |