summaryrefslogtreecommitdiff
path: root/fs/ntfs3
diff options
context:
space:
mode:
authorHaoxiang Li <haoxiang_li2024@163.com>2025-07-15 17:51:20 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-19 16:23:13 +0200
commit3fb19f01e527dfba7d7c5b675e4a53e4a7ed5dcc (patch)
tree73519205664cae69a594ece524a8b846ef66b8a4 /fs/ntfs3
parent668dd220950577759f21b6553272c6bfc4f2f88e (diff)
downloadlinux-3fb19f01e527dfba7d7c5b675e4a53e4a7ed5dcc.tar.gz
linux-3fb19f01e527dfba7d7c5b675e4a53e4a7ed5dcc.tar.bz2
linux-3fb19f01e527dfba7d7c5b675e4a53e4a7ed5dcc.zip
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: 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ntfs3')
-rw-r--r--fs/ntfs3/bitmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ntfs3/bitmap.c b/fs/ntfs3/bitmap.c
index 8dbd8e70c295..57aee52ff999 100644
--- a/fs/ntfs3/bitmap.c
+++ b/fs/ntfs3/bitmap.c
@@ -1374,6 +1374,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;