Patchwork Add missing brelse to xattr code.

login
register
mail settings
Submitter Dave Jones
Date Nov. 6, 2013, 3:45 p.m.
Message ID <20131106154546.GA27255@redhat.com>
Download mbox | patch
Permalink /patch/288959/
State Superseded
Headers show

Comments

Dave Jones - Nov. 6, 2013, 3:45 p.m.
This code was recently patched to not leak memory on the retry path,
but it seems we are also forgetting to brelse the bufferhead.
   
Signed-off-by: Dave Jones <davej@fedoraproject.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 03e9bebba198..1423c4816a47 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1352,6 +1352,7 @@  retry:
 					new_extra_isize = s_min_extra_isize;
 					kfree(is); is = NULL;
 					kfree(bs); bs = NULL;
+					brelse(bh);
 					goto retry;
 				}
 				error = -1;