Skip to content

Commit

Permalink
[XFS] move freeing the mount structure from xfs_mount_free into the c…
Browse files Browse the repository at this point in the history
…allers

In the next patch we need to look at the mount structure until just before
it's freed, so we need to be able to free it as the very last thing in
xfs_unmount.

SGI-PV: 969608
SGI-Modid: xfs-linux-melb:xfs-kern:29501a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
  • Loading branch information
Christoph Hellwig authored and Tim Shimmin committed Oct 16, 2007
1 parent 0a74cd1 commit f541d27
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions fs/xfs/linux-2.6/xfs_vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ bhv_remove_all_vfsops(
mp = XFS_VFSTOM(vfsp);
VFS_REMOVEBHV(vfsp, &mp->m_bhv);
xfs_mount_free(mp, 0);
kmem_free(mp, sizeof(xfs_mount_t));
}

void
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ xfs_mount_free(
}

xfs_icsb_destroy_counters(mp);
kmem_free(mp, sizeof(xfs_mount_t));
}

/*
Expand Down
1 change: 1 addition & 0 deletions fs/xfs/xfs_vfsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ xfs_unmount(
* and free the super block buffer & mount structures.
*/
xfs_unmountfs(mp, credp);
kmem_free(mp, sizeof(xfs_mount_t));
}

return XFS_ERROR(error);
Expand Down

0 comments on commit f541d27

Please sign in to comment.