mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
grow_dev_folio(): we only want ->bd_inode->i_mapping there
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Link: https://lore.kernel.org/r/20240411145346.2516848-3-viro@zeniv.linux.org.uk Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
224941e837
commit
22f89a4f8c
@ -1034,12 +1034,12 @@ static sector_t folio_init_buffers(struct folio *folio,
|
||||
static bool grow_dev_folio(struct block_device *bdev, sector_t block,
|
||||
pgoff_t index, unsigned size, gfp_t gfp)
|
||||
{
|
||||
struct inode *inode = bdev->bd_inode;
|
||||
struct address_space *mapping = bdev->bd_mapping;
|
||||
struct folio *folio;
|
||||
struct buffer_head *bh;
|
||||
sector_t end_block = 0;
|
||||
|
||||
folio = __filemap_get_folio(inode->i_mapping, index,
|
||||
folio = __filemap_get_folio(mapping, index,
|
||||
FGP_LOCK | FGP_ACCESSED | FGP_CREAT, gfp);
|
||||
if (IS_ERR(folio))
|
||||
return false;
|
||||
@ -1073,10 +1073,10 @@ static bool grow_dev_folio(struct block_device *bdev, sector_t block,
|
||||
* lock to be atomic wrt __find_get_block(), which does not
|
||||
* run under the folio lock.
|
||||
*/
|
||||
spin_lock(&inode->i_mapping->i_private_lock);
|
||||
spin_lock(&mapping->i_private_lock);
|
||||
link_dev_buffers(folio, bh);
|
||||
end_block = folio_init_buffers(folio, bdev, size);
|
||||
spin_unlock(&inode->i_mapping->i_private_lock);
|
||||
spin_unlock(&mapping->i_private_lock);
|
||||
unlock:
|
||||
folio_unlock(folio);
|
||||
folio_put(folio);
|
||||
|
Loading…
Reference in New Issue
Block a user