Message ID | CAGXu5j+XON=8U7BfS2W_YJZh8=0zfeuAPkds9Q+oXZPzvgvkqw@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, May 22, 2017 at 10:58:45AM -0700, Kees Cook wrote: > > any updates on this patch? > > Looks like it hasn't been landed yet. > > I think the following would be better (pardon any whitespace damage > via gmail...): > I've applied Kees suggested change to the ext4 git tree. - Ted
diff --git a/fs/buffer.c b/fs/buffer.c index 161be58c5cb0..20292b858b61 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -3021,11 +3021,11 @@ EXPORT_SYMBOL(block_write_full_page); sector_t generic_block_bmap(struct address_space *mapping, sector_t block, get_block_t *get_block) { - struct buffer_head tmp; struct inode *inode = mapping->host; - tmp.b_state = 0; - tmp.b_blocknr = 0; - tmp.b_size = i_blocksize(inode); + struct buffer_head tmp = { + .b_size = i_blocksize(inode); + }; + get_block(inode, block, &tmp, 0); return tmp.b_blocknr; }