From f469ec9c5b95dfed60d5d628e1a8cecfc1f92d7a Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Fri, 9 Mar 2012 07:26:07 -0800 Subject: fs: Remove bogus wait in write_inode_now() inode_sync_wait() in write_inode_now() is just bogus. That function waits for I_SYNC bit to be cleared but writeback_single_inode() clears the bit on return so the wait is effectivelly a nop unless someone else submits the inode for writeback again. All the waiting write_inode_now() needs is achieved by using WB_SYNC_ALL writeback mode. Signed-off-by: Jan Kara Signed-off-by: Christoph Hellwig Signed-off-by: Fengguang Wu --- fs/fs-writeback.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 5b4a9362d5a..f60297ba491 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1364,8 +1364,6 @@ int write_inode_now(struct inode *inode, int sync) ret = writeback_single_inode(inode, wb, &wbc); spin_unlock(&inode->i_lock); spin_unlock(&wb->list_lock); - if (sync) - inode_sync_wait(inode); return ret; } EXPORT_SYMBOL(write_inode_now); -- cgit v1.2.3