Skip to content

Commit d683184

Browse files
Haoxiang Liaalexandrovich
authored andcommitted
fs/ntfs3: Fix a resource leak bug in wnd_extend()
Add put_bh() to decrease the refcount of 'bh' after the job is finished, preventing a resource leak. Fixes: 3f3b442 ("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>
1 parent 736fc7b commit d683184

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/ntfs3/bitmap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,6 +1371,7 @@ int wnd_extend(struct wnd_bitmap *wnd, size_t new_bits)
13711371
mark_buffer_dirty(bh);
13721372
unlock_buffer(bh);
13731373
/* err = sync_dirty_buffer(bh); */
1374+
put_bh(bh);
13741375

13751376
b0 = 0;
13761377
bits -= op;

0 commit comments

Comments
 (0)