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,8 +92,7 @@
10692 "0x%llx.", (unsigned long long)bh->b_blocknr);
10793 }
10894 first = page_buffers(page);
109
- local_irq_save(flags);
110
- bit_spin_lock(BH_Uptodate_Lock, &first->b_state);
95
+ spin_lock_irqsave(&first->b_uptodate_lock, flags);
11196 clear_buffer_async_read(bh);
11297 unlock_buffer(bh);
11398 tmp = bh;
....@@ -122,8 +107,7 @@
122107 }
123108 tmp = tmp->b_this_page;
124109 } while (tmp != bh);
125
- bit_spin_unlock(BH_Uptodate_Lock, &first->b_state);
126
- local_irq_restore(flags);
110
+ spin_unlock_irqrestore(&first->b_uptodate_lock, flags);
127111 /*
128112 * If none of the buffers had errors then we can set the page uptodate,
129113 * but we first have to perform the post read mst fixups, if the
....@@ -156,8 +140,7 @@
156140 unlock_page(page);
157141 return;
158142 still_busy:
159
- bit_spin_unlock(BH_Uptodate_Lock, &first->b_state);
160
- local_irq_restore(flags);
143
+ spin_unlock_irqrestore(&first->b_uptodate_lock, flags);
161144 return;
162145 }
163146
....@@ -1749,7 +1732,7 @@
17491732 bh = bh->b_this_page;
17501733 } while (bh);
17511734 tail->b_this_page = head;
1752
- attach_page_buffers(page, head);
1735
+ attach_page_private(page, head);
17531736 } else
17541737 buffers_to_free = bh;
17551738 }