Add missing brelse to xattr code.
PATCH 1/1 Add missing brelse to xattr code.
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 <[email protected]>
fs/ext4/xattr.c +1 -0
@@ -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 ;
Theodore Ts'o
maintainerQuoted 4 lines · Dave Jones
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 <[email protected]>
Thanks, I have this fix in my tree already.
Cheers,
- Ted
commit dcb9917ba041866686fe152850364826c4622a36
Author: Theodore Ts'o <[email protected]> Date: Thu Oct 31 23:00:24 2013 -0400
ext4: avoid bh leak in retry path of ext4_expand_extra_isize_ea()
Reported-by Dave Jones <[email protected]>
Signed-off-by "Theodore Ts'o" <[email protected]>
fs/ext4/xattr.c +1 -0
@@ -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 ;