Skip to content

Commit 75b46c4

Browse files
committed
gfs2: Fix oversight in gfs2_ail1_flush
Ordinarily, function gfs2_ail1_start_one issues a write request for one item on the ail1 list, then returns -EBUSY. This makes the caller, gfs2_ail1_flush, loop around and start another. However, it was not clearing the -EBUSY return code each time through the loop. So on rare occasions, like when the wbc runs out of nr_to_write, it remained set to -EBUSY, which triggered an error and withdraw. This patch sets the return code to 0 each time through the restart loop so this won't happen anymore. Signed-off-by: Bob Peterson <[email protected]>
1 parent c953a73 commit 75b46c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/gfs2/log.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,14 @@ void gfs2_ail1_flush(struct gfs2_sbd *sdp, struct writeback_control *wbc)
188188
struct list_head *head = &sdp->sd_ail1_list;
189189
struct gfs2_trans *tr;
190190
struct blk_plug plug;
191-
int ret = 0;
191+
int ret;
192192
unsigned long flush_start = jiffies;
193193

194194
trace_gfs2_ail_flush(sdp, wbc, 1);
195195
blk_start_plug(&plug);
196196
spin_lock(&sdp->sd_ail_lock);
197197
restart:
198+
ret = 0;
198199
if (time_after(jiffies, flush_start + (HZ * 600))) {
199200
dump_ail_list(sdp);
200201
goto out;

0 commit comments

Comments
 (0)