diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-11-18 01:19:14 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-11-18 03:30:39 +0100 |
commit | 224b744abf9f0663ca6762a79c7298b663fa4f04 (patch) | |
tree | 4f6a817547e7d0584d96cd539a3d63be75059cf1 /fs/hugetlbfs | |
parent | net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification() (diff) | |
parent | Merge tag 'net-6.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netd... (diff) | |
download | linux-224b744abf9f0663ca6762a79c7298b663fa4f04.tar.xz linux-224b744abf9f0663ca6762a79c7298b663fa4f04.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
include/linux/bpf.h
1f6e04a1c7b8 ("bpf: Fix offset calculation error in __copy_map_value and zero_map_value")
aa3496accc41 ("bpf: Refactor kptr_off_tab into btf_record")
f71b2f64177a ("bpf: Refactor map->off_arr handling")
https://lore.kernel.org/all/20221114095000.67a73239@canb.auug.org.au/
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'fs/hugetlbfs')
-rw-r--r-- | fs/hugetlbfs/inode.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index dd54f67e47fd..df7772335dc0 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -328,6 +328,12 @@ static ssize_t hugetlbfs_read_iter(struct kiocb *iocb, struct iov_iter *to) } else { unlock_page(page); + if (PageHWPoison(page)) { + put_page(page); + retval = -EIO; + break; + } + /* * We have the page, copy it to user space buffer. */ @@ -1111,13 +1117,6 @@ static int hugetlbfs_migrate_folio(struct address_space *mapping, static int hugetlbfs_error_remove_page(struct address_space *mapping, struct page *page) { - struct inode *inode = mapping->host; - pgoff_t index = page->index; - - hugetlb_delete_from_page_cache(page); - if (unlikely(hugetlb_unreserve_pages(inode, index, index + 1, 1))) - hugetlb_fix_reserve_counts(inode); - return 0; } |