Commit 48a7031e authored by Nathan Scott's avatar Nathan Scott

[XFS] Convert to list_for_each_entry_safe form in reclaim list walk.

SGI Modid: xfs-linux:xfs-kern:178673a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent 4a6aa9b2
...@@ -3954,15 +3954,13 @@ int ...@@ -3954,15 +3954,13 @@ int
xfs_finish_reclaim_all(xfs_mount_t *mp, int noblock) xfs_finish_reclaim_all(xfs_mount_t *mp, int noblock)
{ {
int purged; int purged;
struct list_head *curr, *next; xfs_inode_t *ip, *n;
xfs_inode_t *ip;
int done = 0; int done = 0;
while (!done) { while (!done) {
purged = 0; purged = 0;
XFS_MOUNT_ILOCK(mp); XFS_MOUNT_ILOCK(mp);
list_for_each_safe(curr, next, &mp->m_del_inodes) { list_for_each_entry_safe(ip, n, &mp->m_del_inodes, i_reclaim) {
ip = list_entry(curr, xfs_inode_t, i_reclaim);
if (noblock) { if (noblock) {
if (xfs_ilock_nowait(ip, XFS_ILOCK_EXCL) == 0) if (xfs_ilock_nowait(ip, XFS_ILOCK_EXCL) == 0)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment