]>
Commit | Line | Data |
---|---|---|
82094b55 AF |
1 | From 60e2ec48665b8495360ca4a6004c5cd52beb2bc1 Mon Sep 17 00:00:00 2001 |
2 | From: Tao Ma <tao.ma@oracle.com> | |
3 | Date: Wed, 12 Aug 2009 14:42:47 +0800 | |
4 | Subject: [PATCH] ocfs2: release the buffer head in ocfs2_do_truncate. | |
5 | References: bnc#528427 | |
6 | ||
7 | In ocfs2_do_truncate, we forget to release last_eb_bh which | |
8 | will cause memleak. So call brelse in the end. | |
9 | ||
10 | Signed-off-by: Tao Ma <tao.ma@oracle.com> | |
11 | Signed-off-by: Joel Becker <joel.becker@oracle.com> | |
12 | Signed-off-by: Mark Fasheh <mfasheh@suse.com> | |
13 | --- | |
14 | fs/ocfs2/alloc.c | 2 +- | |
15 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
16 | ||
17 | Index: linux-2.6.27-SLE11_BRANCH/fs/ocfs2/alloc.c | |
18 | =================================================================== | |
19 | --- linux-2.6.27-SLE11_BRANCH.orig/fs/ocfs2/alloc.c | |
20 | +++ linux-2.6.27-SLE11_BRANCH/fs/ocfs2/alloc.c | |
21 | @@ -6716,7 +6716,7 @@ static int ocfs2_do_truncate(struct ocfs | |
22 | } | |
23 | status = 0; | |
24 | bail: | |
25 | - | |
26 | + brelse(last_eb_bh); | |
27 | mlog_exit(status); | |
28 | return status; | |
29 | } |