diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-09 00:09:47 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-09 00:09:47 -0200 |
commit | c1b504b676a16c6e191f3db16d5ca9669cf1a4d0 (patch) | |
tree | 3b1213bdcf27972fecf69e114a026b79c842c3c8 /linux/drivers/media/video/em28xx | |
parent | aa23d72a2a69f614a584092012a56ef82dca1d5a (diff) | |
download | mediapointer-dvb-s2-c1b504b676a16c6e191f3db16d5ca9669cf1a4d0.tar.gz mediapointer-dvb-s2-c1b504b676a16c6e191f3db16d5ca9669cf1a4d0.tar.bz2 |
backport commit 5f820f648c92a5ecc771a96b3c29aa6e90013bba
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Author: Tejun Heo <htejun@gmail.com>
poll: allow f_op->poll to sleep
f_op->poll is the only vfs operation which is not allowed to sleep. It's
because poll and select implementation used task state to synchronize
against wake ups, which doesn't have to be the case anymore as wait/wake
interface can now use custom wake up functions. The non-sleep restriction
can be a bit tricky because ->poll is not called from an atomic context
and the result of accidentally sleeping in ->poll only shows up as
temporary busy looping when the timing is right or rather wrong.
This patch converts poll/select to use custom wake up function and use
separate triggered variable to synchronize against wake up events. The
only added overhead is an extra function call during wake up and
negligible.
This patch removes the one non-sleep exception from vfs locking rules and
is beneficial to userland filesystem implementations like FUSE, 9p or
peculiar fs like spufs as it's very difficult for those to implement
non-sleeping poll method.
While at it, make the following cosmetic changes to make poll.h and
select.c checkpatch friendly.
* s/type * symbol/type *symbol/ : three places in poll.h
* remove blank line before EXPORT_SYMBOL() : two places in select.c
Oleg: spotted missing barrier in poll_schedule_timeout()
Davide: spotted missing write barrier in pollwake()
kernel-sync:
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/em28xx')
0 files changed, 0 insertions, 0 deletions