mirror of https://github.com/torvalds/linux.git
gfs2: Switch to wait_event in gfs2_quotad
In gfs2_quotad(), switch from an open-coded wait loop to wait_event_interruptible_timeout(). Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
fe4f7940d2
commit
e4a8b5481c
|
|
@ -1557,7 +1557,6 @@ int gfs2_quotad(void *data)
|
||||||
unsigned long statfs_timeo = 0;
|
unsigned long statfs_timeo = 0;
|
||||||
unsigned long quotad_timeo = 0;
|
unsigned long quotad_timeo = 0;
|
||||||
unsigned long t = 0;
|
unsigned long t = 0;
|
||||||
DEFINE_WAIT(wait);
|
|
||||||
|
|
||||||
while (!kthread_should_stop()) {
|
while (!kthread_should_stop()) {
|
||||||
|
|
||||||
|
|
@ -1583,12 +1582,12 @@ int gfs2_quotad(void *data)
|
||||||
bypass:
|
bypass:
|
||||||
t = min(quotad_timeo, statfs_timeo);
|
t = min(quotad_timeo, statfs_timeo);
|
||||||
|
|
||||||
prepare_to_wait(&sdp->sd_quota_wait, &wait, TASK_INTERRUPTIBLE);
|
t = wait_event_interruptible_timeout(sdp->sd_quota_wait,
|
||||||
if (!sdp->sd_statfs_force_sync)
|
sdp->sd_statfs_force_sync,
|
||||||
t -= schedule_timeout(t);
|
t);
|
||||||
else
|
|
||||||
|
if (sdp->sd_statfs_force_sync)
|
||||||
t = 0;
|
t = 0;
|
||||||
finish_wait(&sdp->sd_quota_wait, &wait);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue