Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f541d270dbce375b7bd8cef466bdaf0cff945b45
Commit:     f541d270dbce375b7bd8cef466bdaf0cff945b45
Parent:     0a74cd1964501fdb577176f14ed3d02b8e148127
Author:     Christoph Hellwig <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 11:53:22 2007 +1000
Committer:  Tim Shimmin <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 11:40:52 2007 +1000

    [XFS] move freeing the mount structure from xfs_mount_free into the callers
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: David Chinner <[EMAIL PROTECTED]>
    Signed-off-by: Tim Shimmin <[EMAIL PROTECTED]>
---
 fs/xfs/linux-2.6/xfs_vfs.c |    1 +
 fs/xfs/xfs_mount.c         |    1 -
 fs/xfs/xfs_vfsops.c        |    1 +
 3 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_vfs.c b/fs/xfs/linux-2.6/xfs_vfs.c
index c5ec272..6ed7f13 100644
--- a/fs/xfs/linux-2.6/xfs_vfs.c
+++ b/fs/xfs/linux-2.6/xfs_vfs.c
@@ -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
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 71f2594..3e948f5 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -194,7 +194,6 @@ xfs_mount_free(
        }
 
        xfs_icsb_destroy_counters(mp);
-       kmem_free(mp, sizeof(xfs_mount_t));
 }
 
 /*
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 3fe64a3..8c0e022 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -640,6 +640,7 @@ out:
                 * and free the super block buffer & mount structures.
                 */
                xfs_unmountfs(mp, credp);
+               kmem_free(mp, sizeof(xfs_mount_t));
        }
 
        return XFS_ERROR(error);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to