[rh7] fs/writeback: fix lazyatime dirty inode writeback

Submitted by Andrey Ryabinin on Sept. 17, 2019, 2:30 p.m.

Details

Message ID 20190917143037.7638-1-aryabinin@virtuozzo.com
State New
Series "fs/writeback: fix lazyatime dirty inode writeback"
Headers show

Commit Message

Andrey Ryabinin Sept. 17, 2019, 2:30 p.m.
Backport of the upstream commit
0ae45f63d4ef ("vfs: add support for a lazytime mount option")
missed hunk in move_expired_inode() leading to incorrect timeout check
for dirty_time inodes which leads to flushing these dirty inodes too soon.

Fix this up by using correct older_than_this variable instead of
work->older_than_this.

Fixes: 3b6234af8d34 ("ms/vfs: add support for a lazytime mount option")
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
 fs/fs-writeback.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index fd2a666a4a40..76c1aa26fd6f 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -324,8 +324,8 @@  static int move_expired_inodes(struct list_head *delaying_queue,
 
 	while (!list_empty(delaying_queue)) {
 		inode = wb_inode(delaying_queue->prev);
-		if (work->older_than_this &&
-		    inode_dirtied_after(inode, *work->older_than_this))
+		if (older_than_this &&
+		    inode_dirtied_after(inode, *older_than_this))
 			break;
 		list_move(&inode->i_io_list, &tmp);
 		moved++;