summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2007-05-24 07:21:57 +0200
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-07-14 07:23:23 +0200
commit511105b3d7c2440ee84fc3f90d200569aac88162 (patch)
treecca4cec4d200931a7f7d3e9701c1d651d1208255 /fs/xfs/xfs_log.c
parent[XFS] Fix double free in xfs_buf_get_noaddr error handling path (diff)
downloadlinux-511105b3d7c2440ee84fc3f90d200569aac88162.tar.xz
linux-511105b3d7c2440ee84fc3f90d200569aac88162.zip
[XFS] Fix vmalloc leak on mount/unmount.
When setting the length of the iclogbuf to write out we should just be changing the desired byte count rather completely reassociating the buffer memory with the buffer. Reassociating the buffer memory changes the apparent length of the buffer and hence when we free the buffer, we don't free all the vmap()d space we originally allocated. SGI-PV: 964983 SGI-Modid: xfs-linux-melb:xfs-kern:28640a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r--fs/xfs/xfs_log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 5bb902056e61..fb50fd400e53 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -1436,7 +1436,7 @@ xlog_sync(xlog_t *log,
} else {
iclog->ic_bwritecnt = 1;
}
- XFS_BUF_SET_PTR(bp, (xfs_caddr_t) &(iclog->ic_header), count);
+ XFS_BUF_SET_COUNT(bp, count);
XFS_BUF_SET_FSPRIVATE(bp, iclog); /* save for later */
XFS_BUF_ZEROFLAGS(bp);
XFS_BUF_BUSY(bp);