fs/ntfs3: Fix a resource leak bug in wnd_extend()
commit d68318471aa2e16222ebf492883e05a2d72b9b17 upstream.
Add put_bh() to decrease the refcount of 'bh' after the job
is finished, preventing a resource leak.
Fixes: 3f3b442b5a ("fs/ntfs3: Add bitmap")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7819c94b51
commit
49af0d7900
@@ -1371,6 +1371,7 @@ int wnd_extend(struct wnd_bitmap *wnd, size_t new_bits)
|
||||
mark_buffer_dirty(bh);
|
||||
unlock_buffer(bh);
|
||||
/* err = sync_dirty_buffer(bh); */
|
||||
put_bh(bh);
|
||||
|
||||
b0 = 0;
|
||||
bits -= op;
|
||||
|
||||
Reference in New Issue
Block a user