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: [email protected] Signed-off-by: Haoxiang Li <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 736fc7b commit d683184

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)