Commit 703074c5 authored by Linus Torvalds's avatar Linus Torvalds

Merge http://linux-ntfs.bkbits.net/ntfs-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents ec44dec7 492d6ea7
...@@ -293,8 +293,12 @@ void exit_thread(void) ...@@ -293,8 +293,12 @@ void exit_thread(void)
/* The process may have allocated an io port bitmap... nuke it. */ /* The process may have allocated an io port bitmap... nuke it. */
if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) { if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) {
int cpu = get_cpu();
struct tss_struct *tss = init_tss + cpu;
kfree(tsk->thread.io_bitmap_ptr); kfree(tsk->thread.io_bitmap_ptr);
tsk->thread.io_bitmap_ptr = NULL; tsk->thread.io_bitmap_ptr = NULL;
tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
put_cpu();
} }
} }
......
...@@ -256,10 +256,11 @@ void exit_thread(void) ...@@ -256,10 +256,11 @@ void exit_thread(void)
{ {
struct task_struct *me = current; struct task_struct *me = current;
if (me->thread.io_bitmap_ptr) { if (me->thread.io_bitmap_ptr) {
struct tss_struct *tss = init_tss + get_cpu();
kfree(me->thread.io_bitmap_ptr); kfree(me->thread.io_bitmap_ptr);
me->thread.io_bitmap_ptr = NULL; me->thread.io_bitmap_ptr = NULL;
(init_tss + smp_processor_id())->io_bitmap_base = tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
INVALID_IO_BITMAP_OFFSET; put_cpu();
} }
} }
......
...@@ -1774,6 +1774,9 @@ static int idedisk_open(struct inode *inode, struct file *filp) ...@@ -1774,6 +1774,9 @@ static int idedisk_open(struct inode *inode, struct file *filp)
static int ide_cacheflush_p(ide_drive_t *drive) static int ide_cacheflush_p(ide_drive_t *drive)
{ {
if (!(drive->id->cfs_enable_2 & 0x3000))
return 0;
if(drive->wcache) if(drive->wcache)
{ {
if (do_idedisk_flushcache(drive)) if (do_idedisk_flushcache(drive))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment