| .. | .. | 
|---|
|  | 1 | +// SPDX-License-Identifier: GPL-2.0-or-later | 
|---|
| 1 | 2 | /** | 
|---|
| 2 | 3 | * aops.c - NTFS kernel address space operations and page cache handling. | 
|---|
| 3 | 4 | * | 
|---|
| 4 | 5 | * Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc. | 
|---|
| 5 | 6 | * Copyright (c) 2002 Richard Russon | 
|---|
| 6 |  | - * | 
|---|
| 7 |  | - * This program/include file is free software; you can redistribute it and/or | 
|---|
| 8 |  | - * modify it under the terms of the GNU General Public License as published | 
|---|
| 9 |  | - * by the Free Software Foundation; either version 2 of the License, or | 
|---|
| 10 |  | - * (at your option) any later version. | 
|---|
| 11 |  | - * | 
|---|
| 12 |  | - * This program/include file is distributed in the hope that it will be | 
|---|
| 13 |  | - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty | 
|---|
| 14 |  | - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 15 |  | - * GNU General Public License for more details. | 
|---|
| 16 |  | - * | 
|---|
| 17 |  | - * You should have received a copy of the GNU General Public License | 
|---|
| 18 |  | - * along with this program (in the main directory of the Linux-NTFS | 
|---|
| 19 |  | - * distribution in the file COPYING); if not, write to the Free Software | 
|---|
| 20 |  | - * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA | 
|---|
| 21 | 7 | */ | 
|---|
| 22 | 8 |  | 
|---|
| 23 | 9 | #include <linux/errno.h> | 
|---|
| .. | .. | 
|---|
| 106 | 92 | "0x%llx.", (unsigned long long)bh->b_blocknr); | 
|---|
| 107 | 93 | } | 
|---|
| 108 | 94 | first = page_buffers(page); | 
|---|
| 109 |  | -	flags = bh_uptodate_lock_irqsave(first); | 
|---|
|  | 95 | +	spin_lock_irqsave(&first->b_uptodate_lock, flags); | 
|---|
| 110 | 96 | clear_buffer_async_read(bh); | 
|---|
| 111 | 97 | unlock_buffer(bh); | 
|---|
| 112 | 98 | tmp = bh; | 
|---|
| .. | .. | 
|---|
| 121 | 107 | } | 
|---|
| 122 | 108 | tmp = tmp->b_this_page; | 
|---|
| 123 | 109 | } while (tmp != bh); | 
|---|
| 124 |  | -	bh_uptodate_unlock_irqrestore(first, flags); | 
|---|
|  | 110 | +	spin_unlock_irqrestore(&first->b_uptodate_lock, flags); | 
|---|
| 125 | 111 | /* | 
|---|
| 126 | 112 | * If none of the buffers had errors then we can set the page uptodate, | 
|---|
| 127 | 113 | * but we first have to perform the post read mst fixups, if the | 
|---|
| .. | .. | 
|---|
| 154 | 140 | unlock_page(page); | 
|---|
| 155 | 141 | return; | 
|---|
| 156 | 142 | still_busy: | 
|---|
| 157 |  | -	bh_uptodate_unlock_irqrestore(first, flags); | 
|---|
|  | 143 | +	spin_unlock_irqrestore(&first->b_uptodate_lock, flags); | 
|---|
|  | 144 | +	return; | 
|---|
| 158 | 145 | } | 
|---|
| 159 | 146 |  | 
|---|
| 160 | 147 | /** | 
|---|
| .. | .. | 
|---|
| 1745 | 1732 | bh = bh->b_this_page; | 
|---|
| 1746 | 1733 | } while (bh); | 
|---|
| 1747 | 1734 | tail->b_this_page = head; | 
|---|
| 1748 |  | -			attach_page_buffers(page, head); | 
|---|
|  | 1735 | +			attach_page_private(page, head); | 
|---|
| 1749 | 1736 | } else | 
|---|
| 1750 | 1737 | buffers_to_free = bh; | 
|---|
| 1751 | 1738 | } | 
|---|