aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs/aops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ntfs/aops.c')
-rw-r--r--fs/ntfs/aops.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c
index cfce53cb65d7..2d38d1d150ef 100644
--- a/fs/ntfs/aops.c
+++ b/fs/ntfs/aops.c
@@ -29,6 +29,7 @@
29#include <linux/buffer_head.h> 29#include <linux/buffer_head.h>
30#include <linux/writeback.h> 30#include <linux/writeback.h>
31#include <linux/bit_spinlock.h> 31#include <linux/bit_spinlock.h>
32#include <linux/interrupt.h>
32 33
33#include "aops.h" 34#include "aops.h"
34#include "attrib.h" 35#include "attrib.h"
@@ -107,8 +108,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
107 "0x%llx.", (unsigned long long)bh->b_blocknr); 108 "0x%llx.", (unsigned long long)bh->b_blocknr);
108 } 109 }
109 first = page_buffers(page); 110 first = page_buffers(page);
110 local_irq_save(flags); 111 spin_lock_irqsave(&first->b_uptodate_lock, flags);
111 bit_spin_lock(BH_Uptodate_Lock, &first->b_state);
112 clear_buffer_async_read(bh); 112 clear_buffer_async_read(bh);
113 unlock_buffer(bh); 113 unlock_buffer(bh);
114 tmp = bh; 114 tmp = bh;
@@ -123,8 +123,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
123 } 123 }
124 tmp = tmp->b_this_page; 124 tmp = tmp->b_this_page;
125 } while (tmp != bh); 125 } while (tmp != bh);
126 bit_spin_unlock(BH_Uptodate_Lock, &first->b_state); 126 spin_unlock_irqrestore(&first->b_uptodate_lock, flags);
127 local_irq_restore(flags);
128 /* 127 /*
129 * If none of the buffers had errors then we can set the page uptodate, 128 * If none of the buffers had errors then we can set the page uptodate,
130 * but we first have to perform the post read mst fixups, if the 129 * but we first have to perform the post read mst fixups, if the
@@ -145,13 +144,13 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
145 recs = PAGE_CACHE_SIZE / rec_size; 144 recs = PAGE_CACHE_SIZE / rec_size;
146 /* Should have been verified before we got here... */ 145 /* Should have been verified before we got here... */
147 BUG_ON(!recs); 146 BUG_ON(!recs);
148 local_irq_save(flags); 147 local_irq_save_nort(flags);
149 kaddr = kmap_atomic(page, KM_BIO_SRC_IRQ); 148 kaddr = kmap_atomic(page, KM_BIO_SRC_IRQ);
150 for (i = 0; i < recs; i++) 149 for (i = 0; i < recs; i++)
151 post_read_mst_fixup((NTFS_RECORD*)(kaddr + 150 post_read_mst_fixup((NTFS_RECORD*)(kaddr +
152 i * rec_size), rec_size); 151 i * rec_size), rec_size);
153 kunmap_atomic(kaddr, KM_BIO_SRC_IRQ); 152 kunmap_atomic(kaddr, KM_BIO_SRC_IRQ);
154 local_irq_restore(flags); 153 local_irq_restore_nort(flags);
155 flush_dcache_page(page); 154 flush_dcache_page(page);
156 if (likely(page_uptodate && !PageError(page))) 155 if (likely(page_uptodate && !PageError(page)))
157 SetPageUptodate(page); 156 SetPageUptodate(page);
@@ -159,8 +158,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
159 unlock_page(page); 158 unlock_page(page);
160 return; 159 return;
161still_busy: 160still_busy:
162 bit_spin_unlock(BH_Uptodate_Lock, &first->b_state); 161 spin_unlock_irqrestore(&first->b_uptodate_lock, flags);
163 local_irq_restore(flags);
164 return; 162 return;
165} 163}
166 164