From: John Jacques <[email protected]>

Signed-off-by: John Jacques <[email protected]>
---
 fs/fs-writeback.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 32a8bbd..478ab4e 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -762,7 +762,10 @@ static long writeback_sb_inodes(struct super_block *sb,
                requeue_inode(inode, wb, &wbc);
                inode_sync_complete(inode);
                spin_unlock(&inode->i_lock);
-               cond_resched_lock(&wb->list_lock);
+
+               if (spin_needbreak(&wb->list_lock))
+                       cond_resched_lock(&wb->list_lock);
+
                /*
                 * bail out to wb_writeback() often enough to check
                 * background threshold and other termination conditions.
-- 
1.9.1

-- 
_______________________________________________
linux-yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to