Re: [PATCH] fbdefio: add set_page_dirty handler to deferred IO FB

From: Andrew Morton
Date: Wed Aug 20 2008 - 04:38:56 EST


On Wed, 20 Aug 2008 09:13:23 +0100 Ian Campbell <ijc@xxxxxxxxxxxxxx> wrote:

> Perhaps applying the band-aid at open time instead would be preferred?

That would be less racy, I expect. Implement fb_ops.fb_open() within
drivers/video/fb_defio.c and do the address_space_operations overwrite
there. Hopefully that will ensure that the address_space_operations
instance is stable before anyone uses it for anything serious.

It'd be better to hook in at inode creation time but afaict that's not
available for the /dev/fb0 node.

<tries to write a patch>

OK, seems that fb_ops.fb_open() has no way of getting at the `struct
file *' which is being opened (wtf?). Screwed. Need to change
fb_ops.fb_open(), or add a new fb_ops.fb_open_sane().




--
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/