Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fa8609da993b04dc2dd762173a6d0ab1a192e256
Commit:     fa8609da993b04dc2dd762173a6d0ab1a192e256
Parent:     3896625d0badd53dbc34d584861a36ba7eb4613f
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 30 14:36:24 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jan 30 16:01:35 2007 -0800

    [PATCH] ntfs: kmap_atomic() atomicity fix
    
    The KM_BIO_SRC_IRQ kmap slot requires local irq protection.
    
    Acked-by: Anton Altaparmakov <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/ntfs/aops.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c
index 7b2c8f4..629e7ab 100644
--- a/fs/ntfs/aops.c
+++ b/fs/ntfs/aops.c
@@ -92,10 +92,12 @@ static void ntfs_end_buffer_async_read(struct buffer_head 
*bh, int uptodate)
                        ofs = 0;
                        if (file_ofs < init_size)
                                ofs = init_size - file_ofs;
+                       local_irq_save(flags);
                        kaddr = kmap_atomic(page, KM_BIO_SRC_IRQ);
                        memset(kaddr + bh_offset(bh) + ofs, 0,
                                        bh->b_size - ofs);
                        kunmap_atomic(kaddr, KM_BIO_SRC_IRQ);
+                       local_irq_restore(flags);
                        flush_dcache_page(page);
                }
        } else {
@@ -143,11 +145,13 @@ static void ntfs_end_buffer_async_read(struct buffer_head 
*bh, int uptodate)
                recs = PAGE_CACHE_SIZE / rec_size;
                /* Should have been verified before we got here... */
                BUG_ON(!recs);
+               local_irq_save(flags);
                kaddr = kmap_atomic(page, KM_BIO_SRC_IRQ);
                for (i = 0; i < recs; i++)
                        post_read_mst_fixup((NTFS_RECORD*)(kaddr +
                                        i * rec_size), rec_size);
                kunmap_atomic(kaddr, KM_BIO_SRC_IRQ);
+               local_irq_restore(flags);
                flush_dcache_page(page);
                if (likely(page_uptodate && !PageError(page)))
                        SetPageUptodate(page);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to