]> git.neil.brown.name Git - susman.git/commitdiff
lsusd: add missing unlock of disable file.
authorNeilBrown <neilb@suse.de>
Thu, 15 Mar 2012 20:40:02 +0000 (07:40 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 15 Mar 2012 20:40:02 +0000 (07:40 +1100)
We shouldn't hold the disable file locked while
alerting watchers.  The comment said that we didn't,
but we did.
So unlock it.

Signed-off-by: NeilBrown <neilb@suse.de>
lsusd.c

diff --git a/lsusd.c b/lsusd.c
index 91b0512cd911c66f4842558818a079347933d484..1886816c75ad4b2dfe8840ea1a68f9d06125afd4 100644 (file)
--- a/lsusd.c
+++ b/lsusd.c
@@ -181,6 +181,7 @@ main(int argc, char *argv)
                        /* blocked - so need to ensure request still valid */
                        continue;
                }
+               flock(disable, LOCK_UN);;
                /* we got that without blocking but are not holding it */
 
                /* Next two might block, but that doesn't abort suspend */