diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2018-11-11 14:15:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-01 11:37:34 +0300 |
commit | 38084377af4fc8093f02a47e43124579affa7b16 (patch) | |
tree | dd2c7582a4d11bf5e38ccb8125603e58927ec9f2 /kernel/smp.c | |
parent | 9365cdf8db5139f63ffd51fc2743c90cb95fd991 (diff) | |
download | linux-38084377af4fc8093f02a47e43124579affa7b16.tar.xz |
gfs2: Fix iomap buffer head reference counting bug
commit c26b5aa8ef0d46035060fded475e6ab957b9f69f upstream.
GFS2 passes the inode buffer head (dibh) from gfs2_iomap_begin to
gfs2_iomap_end in iomap->private. It sets that private pointer in
gfs2_iomap_get. Users of gfs2_iomap_get other than gfs2_iomap_begin
would have to release iomap->private, but this isn't done correctly,
leading to a leak of buffer head references.
To fix this, move the code for setting iomap->private from
gfs2_iomap_get to gfs2_iomap_begin.
Fixes: 64bc06bb32 ("gfs2: iomap buffered write support")
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/smp.c')
0 files changed, 0 insertions, 0 deletions