summaryrefslogtreecommitdiff
path: root/fs/afs/vlocation.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/afs/vlocation.c')
-rw-r--r--fs/afs/vlocation.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c
index 74cce174882a..09e3ad0fc7cc 100644
--- a/fs/afs/vlocation.c
+++ b/fs/afs/vlocation.c
@@ -12,6 +12,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
+#include <linux/sched.h>
#include "internal.h"
unsigned afs_vlocation_timeout = 10; /* volume location timeout in seconds */
@@ -416,8 +417,8 @@ fill_in_record:
goto error_abandon;
spin_lock(&vl->lock);
vl->state = AFS_VL_VALID;
- wake_up(&vl->waitq);
spin_unlock(&vl->lock);
+ wake_up(&vl->waitq);
/* schedule for regular updates */
afs_vlocation_queue_for_updates(vl);
@@ -442,7 +443,7 @@ found_in_memory:
_debug("invalid [state %d]", state);
- if ((state == AFS_VL_NEW || state == AFS_VL_NO_VOLUME)) {
+ if (state == AFS_VL_NEW || state == AFS_VL_NO_VOLUME) {
vl->state = AFS_VL_CREATING;
spin_unlock(&vl->lock);
goto fill_in_record;
@@ -453,11 +454,10 @@ found_in_memory:
_debug("wait");
spin_unlock(&vl->lock);
- ret = wait_event_interruptible(
- vl->waitq,
- vl->state == AFS_VL_NEW ||
- vl->state == AFS_VL_VALID ||
- vl->state == AFS_VL_NO_VOLUME);
+ ret = wait_event_interruptible(vl->waitq,
+ vl->state == AFS_VL_NEW ||
+ vl->state == AFS_VL_VALID ||
+ vl->state == AFS_VL_NO_VOLUME);
if (ret < 0)
goto error;
spin_lock(&vl->lock);
@@ -471,8 +471,8 @@ success:
error_abandon:
spin_lock(&vl->lock);
vl->state = AFS_VL_NEW;
- wake_up(&vl->waitq);
spin_unlock(&vl->lock);
+ wake_up(&vl->waitq);
error:
ASSERT(vl != NULL);
afs_put_vlocation(vl);
@@ -603,7 +603,7 @@ int __init afs_vlocation_update_init(void)
/*
* discard all the volume location records for rmmod
*/
-void __exit afs_vlocation_purge(void)
+void afs_vlocation_purge(void)
{
afs_vlocation_timeout = 0;
@@ -675,7 +675,6 @@ static void afs_vlocation_updater(struct work_struct *work)
case 0:
afs_vlocation_apply_update(vl, &vldb);
vl->state = AFS_VL_VALID;
- wake_up(&vl->waitq);
break;
case -ENOMEDIUM:
vl->state = AFS_VL_VOLUME_DELETED;
@@ -685,6 +684,7 @@ static void afs_vlocation_updater(struct work_struct *work)
break;
}
spin_unlock(&vl->lock);
+ wake_up(&vl->waitq);
/* and then reschedule */
_debug("reschedule");