From: Magnus Damm <magnus.damm@gmail.com>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: Magnus Damm <magnus.damm@gmail.com>
Subject: [PATCH] video: fix deferred io fsync()
Date: Wed, 17 Dec 2008 17:35:07 +0900 [thread overview]
Message-ID: <20081217083507.30318.63380.sendpatchset@rx1.opensource.se> (raw)
From: Magnus Damm <damm@igel.co.jp>
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.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
drivers/video/fb_defio.c | 4 ++++
1 file changed, 4 insertions(+)
--- 0001/drivers/video/fb_defio.c
+++ work/drivers/video/fb_defio.c 2008-12-17 15:27:44.000000000 +0900
@@ -60,6 +60,10 @@ int fb_deferred_io_fsync(struct file *fi
{
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);
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
next reply other threads:[~2008-12-17 8:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-17 8:35 Magnus Damm [this message]
2008-12-24 5:03 ` [PATCH] video: fix deferred io fsync() Jaya Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081217083507.30318.63380.sendpatchset@rx1.opensource.se \
--to=magnus.damm@gmail.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).