mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
gfs2: Fixes to "Implement iomap for block_map" (2)
commit 3b5da96e45
upstream.
It turns out that commit 3229c18c0d6b2 'Fixes to "Implement iomap for
block_map"' introduced another bug in gfs2_iomap_begin that can cause
gfs2_block_map to set bh->b_size of an actual buffer to 0. This can
lead to arbitrary incorrect behavior including crashes or disk
corruption. Revert the incorrect part of that commit.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
105cd2ef03
commit
ae53e57f59
|
@ -811,9 +811,6 @@ do_alloc:
|
|||
iomap->length = hole_size(inode, lblock, &mp);
|
||||
else
|
||||
iomap->length = size - pos;
|
||||
} else {
|
||||
if (height <= ip->i_height)
|
||||
iomap->length = hole_size(inode, lblock, &mp);
|
||||
}
|
||||
goto out_release;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user