提交 87884bd8 编写于 作者: M Magnus Damm 提交者: Paul Mundt

video: fix deferred io fsync()

If CONFIG_FB_DEFERRED_IO is set, but there are framebuffers
registered that does not make use of deferred io, then fsync()
on those framebuffers will result in a crash. Fix that.

This is needed for sh_mobile_lcdcfb since we always enable
deferred io at compile time but we may disable deferred io
for some types of hardware configurations.
Signed-off-by: NMagnus Damm <damm@igel.co.jp>
Acked-by: NJaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 07905554
......@@ -60,6 +60,10 @@ int fb_deferred_io_fsync(struct file *file, struct dentry *dentry, int datasync)
{
struct fb_info *info = file->private_data;
/* Skip if deferred io is complied-in but disabled on this fbdev */
if (!info->fbdefio)
return 0;
/* Kill off the delayed work */
cancel_rearming_delayed_work(&info->deferred_work);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册