Re: [PATCH] IDE: ide-taskfile.c fix compilation warning and cleanup

From: Bartlomiej Zolnierkiewicz
Date: Mon Jun 22 2009 - 07:44:16 EST


On Monday 22 June 2009 08:09:33 Jaswinder Singh Rajput wrote:

> @@ -248,8 +250,9 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
> page = nth_page(page, (offset >> PAGE_SHIFT));
> offset %= PAGE_SIZE;
>
> - if (PageHighMem(page))
> - local_irq_save(flags);
> +#ifdef CONFIG_HIGHMEM
> + local_irq_save(flags);
> +#endif
>
> buf = kmap_atomic(page, KM_BIO_SRC_IRQ) + offset;
>
> @@ -269,8 +272,9 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
>
> kunmap_atomic(buf, KM_BIO_SRC_IRQ);
>
> - if (PageHighMem(page))
> - local_irq_restore(flags);
> +#ifdef CONFIG_HIGHMEM
> + local_irq_restore(flags);
> +#endif

This part is incorrect (adds a performance regression for low-mem pages
w/ HIGHMEM=y) and seems to be accidental (nothing about it in the patch
description).

Besides I would suggest splitting the patch on fix and cleanup parts.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/