nilfs2: fix memory leak in nilfs_ioctl_clean_segments
PATCH 1/1 nilfs2: fix memory leak in nilfs_ioctl_clean_segments
Hi,
Kentaro Suzuki-san gave me a bug report related to the garbage collection today.
The problem was brought by the recent bugfix patch and turned out to be causing a new memory leak problem for linux-2.6.30-rc6 and nilfs2-modules-2.0.13.
This is the bugfix patch against 2.6.30-rc6. I'll send it to Linus and backport to the module package.
Regards,
Ryusuke Konishi
--
From: Ryusuke Konishi <[email protected]>
This fixes a new memory leak problem in garbage collection. The problem was brought by the bugfix patch ("nilfs2: fix lock order reversal in nilfs_clean_segments ioctl").
Thanks to Kentaro Suzuki for finding this problem.
Reported-by Kentaro Suzuki <k_suzuki-/[email protected]>
Signed-off-by Ryusuke Konishi <[email protected]>
--- fs/nilfs2/ioctl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nilfs2/ioctl.c +1 -1
@@ -576,7 +576,7 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp, ret =nilfs_clean_segments (inode->i_sb, argv, kbufs); out_free: -while (--n >0 ) +while (--n >=0 )vfree (kbufs[n]);kfree (kbufs[4 ]);return ret;
Signature · 1 line
1.6.2