Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166338
b: refs/heads/master
c: 5c03449
h: refs/heads/master
v: v3
  • Loading branch information
Shaohua Li authored and Jens Axboe committed Sep 25, 2009
1 parent fc42e19 commit b28705d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b0830cb9085f4b69f9d57d7f3aaff322ffbec26
refs/heads/master: 5c03449d34debca0deab58046377e1175c1bcd7e
21 changes: 18 additions & 3 deletions trunk/fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,28 @@ static void move_expired_inodes(struct list_head *delaying_queue,
struct list_head *dispatch_queue,
unsigned long *older_than_this)
{
LIST_HEAD(tmp);
struct list_head *pos, *node;
struct super_block *sb;
struct inode *inode;

while (!list_empty(delaying_queue)) {
struct inode *inode = list_entry(delaying_queue->prev,
struct inode, i_list);
inode = list_entry(delaying_queue->prev, struct inode, i_list);
if (older_than_this &&
inode_dirtied_after(inode, *older_than_this))
break;
list_move(&inode->i_list, dispatch_queue);
list_move(&inode->i_list, &tmp);
}

/* Move inodes from one superblock together */
while (!list_empty(&tmp)) {
inode = list_entry(tmp.prev, struct inode, i_list);
sb = inode->i_sb;
list_for_each_prev_safe(pos, node, &tmp) {
inode = list_entry(pos, struct inode, i_list);
if (inode->i_sb == sb)
list_move(&inode->i_list, dispatch_queue);
}
}
}

Expand Down

0 comments on commit b28705d

Please sign in to comment.