hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/fs/ntfs/aops.c
....@@ -1,23 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /**
23 * aops.c - NTFS kernel address space operations and page cache handling.
34 *
45 * Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc.
56 * 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
217 */
228
239 #include <linux/errno.h>
....@@ -106,7 +92,7 @@
10692 "0x%llx.", (unsigned long long)bh->b_blocknr);
10793 }
10894 first = page_buffers(page);
109
- flags = bh_uptodate_lock_irqsave(first);
95
+ spin_lock_irqsave(&first->b_uptodate_lock, flags);
11096 clear_buffer_async_read(bh);
11197 unlock_buffer(bh);
11298 tmp = bh;
....@@ -121,7 +107,7 @@
121107 }
122108 tmp = tmp->b_this_page;
123109 } while (tmp != bh);
124
- bh_uptodate_unlock_irqrestore(first, flags);
110
+ spin_unlock_irqrestore(&first->b_uptodate_lock, flags);
125111 /*
126112 * If none of the buffers had errors then we can set the page uptodate,
127113 * but we first have to perform the post read mst fixups, if the
....@@ -154,7 +140,8 @@
154140 unlock_page(page);
155141 return;
156142 still_busy:
157
- bh_uptodate_unlock_irqrestore(first, flags);
143
+ spin_unlock_irqrestore(&first->b_uptodate_lock, flags);
144
+ return;
158145 }
159146
160147 /**
....@@ -1745,7 +1732,7 @@
17451732 bh = bh->b_this_page;
17461733 } while (bh);
17471734 tail->b_this_page = head;
1748
- attach_page_buffers(page, head);
1735
+ attach_page_private(page, head);
17491736 } else
17501737 buffers_to_free = bh;
17511738 }