Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 3f3b442b5ad2 ("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>

authored by

Haoxiang Li and committed by
Konstantin Komarov
d6831847 736fc7bf

+1
+1
fs/ntfs3/bitmap.c
··· 1371 1371 mark_buffer_dirty(bh); 1372 1372 unlock_buffer(bh); 1373 1373 /* err = sync_dirty_buffer(bh); */ 1374 + put_bh(bh); 1374 1375 1375 1376 b0 = 0; 1376 1377 bits -= op;