From: Rafael J. Wysocki Date: Wed, 11 Jun 2008 20:09:45 +0000 (+0200) Subject: snapshot: Use pm_mutex for mutual exclusion X-Git-Tag: v2.6.27-rc1~1050^2~57 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25f2f3daadaf0768a61d02ee3ed3d9a21e9dc46c;p=pandora-kernel.git snapshot: Use pm_mutex for mutual exclusion We can avoid taking the BKL in snapshot_ioctl() if pm_mutex is used to prevent the ioctls from being executed concurrently. In addition, although it is only possible to open /dev/snapshot once, the task which has done that may spawn a child that will inherit the open descriptor, so in theory they can call snapshot_write(), snapshot_read() and snapshot_release() concurrently. pm_mutex can also be used for mutual exclusion in such cases. Signed-off-by: Rafael J. Wysocki Signed-off-by: Andi Kleen Acked-by: Pavel Machek Signed-off-by: Len Brown --- Reading git-diff-tree failed