Re: [PATCH 06/11] mm/truncate: add folio_unmap_invalidate() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 13, 2024 at 08:55:20AM -0700, Jens Axboe wrote:
> @@ -629,18 +641,8 @@ int invalidate_inode_pages2_range(struct address_space *mapping,
>  				folio_unlock(folio);
>  				continue;
>  			}
> -			VM_BUG_ON_FOLIO(!folio_contains(folio, indices[i]), folio);
>  			folio_wait_writeback(folio);

Any particular reason you drop this VM_BUG_ON_FOLIO()?

> -
> -			if (folio_mapped(folio))
> -				unmap_mapping_folio(folio);
> -			BUG_ON(folio_mapped(folio));
> -
> -			ret2 = folio_launder(mapping, folio);
> -			if (ret2 == 0) {
> -				if (!invalidate_complete_folio2(mapping, folio))
> -					ret2 = -EBUSY;
> -			}
> +			ret2 = folio_unmap_invalidate(mapping, folio, GFP_KERNEL);
>  			if (ret2 < 0)
>  				ret = ret2;
>  			folio_unlock(folio);

-- 
  Kiryl Shutsemau / Kirill A. Shutemov




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux