File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2076,6 +2076,7 @@ static long wb_writeback(struct bdi_writeback *wb,
2076
2076
struct inode * inode ;
2077
2077
long progress ;
2078
2078
struct blk_plug plug ;
2079
+ bool queued = false;
2079
2080
2080
2081
blk_start_plug (& plug );
2081
2082
for (;;) {
@@ -2118,8 +2119,10 @@ static long wb_writeback(struct bdi_writeback *wb,
2118
2119
dirtied_before = jiffies ;
2119
2120
2120
2121
trace_writeback_start (wb , work );
2121
- if (list_empty (& wb -> b_io ))
2122
+ if (list_empty (& wb -> b_io )) {
2122
2123
queue_io (wb , work , dirtied_before );
2124
+ queued = true;
2125
+ }
2123
2126
if (work -> sb )
2124
2127
progress = writeback_sb_inodes (work -> sb , wb , work );
2125
2128
else
@@ -2134,7 +2137,7 @@ static long wb_writeback(struct bdi_writeback *wb,
2134
2137
* mean the overall work is done. So we keep looping as long
2135
2138
* as made some progress on cleaning pages or inodes.
2136
2139
*/
2137
- if (progress ) {
2140
+ if (progress || ! queued ) {
2138
2141
spin_unlock (& wb -> list_lock );
2139
2142
continue ;
2140
2143
}
You can’t perform that action at this time.
0 commit comments