Skip to content

Commit e4a8b54

Browse files
author
Andreas Gruenbacher
committed
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>
1 parent fe4f794 commit e4a8b54

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

fs/gfs2/quota.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,7 +1557,6 @@ int gfs2_quotad(void *data)
15571557
unsigned long statfs_timeo = 0;
15581558
unsigned long quotad_timeo = 0;
15591559
unsigned long t = 0;
1560-
DEFINE_WAIT(wait);
15611560

15621561
while (!kthread_should_stop()) {
15631562

@@ -1583,12 +1582,12 @@ int gfs2_quotad(void *data)
15831582
bypass:
15841583
t = min(quotad_timeo, statfs_timeo);
15851584

1586-
prepare_to_wait(&sdp->sd_quota_wait, &wait, TASK_INTERRUPTIBLE);
1587-
if (!sdp->sd_statfs_force_sync)
1588-
t -= schedule_timeout(t);
1589-
else
1585+
t = wait_event_interruptible_timeout(sdp->sd_quota_wait,
1586+
sdp->sd_statfs_force_sync,
1587+
t);
1588+
1589+
if (sdp->sd_statfs_force_sync)
15901590
t = 0;
1591-
finish_wait(&sdp->sd_quota_wait, &wait);
15921591
}
15931592

15941593
return 0;

0 commit comments

Comments
 (0)