aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-03-09 10:26:07 -0500
committerFengguang Wu <fengguang.wu@intel.com>2012-03-21 03:26:47 -0400
commitf469ec9c5b95dfed60d5d628e1a8cecfc1f92d7a (patch)
treedaee82683fc13e29a3b92d39fd7a6a8a06288d69 /fs
parent9f8050c4f99789d03ca96d4e625bd6637241828f (diff)
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 <jack@suse.cz> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/fs-writeback.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 5b4a9362d5aa..f60297ba4912 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -1364,8 +1364,6 @@ int write_inode_now(struct inode *inode, int sync)
1364 ret = writeback_single_inode(inode, wb, &wbc); 1364 ret = writeback_single_inode(inode, wb, &wbc);
1365 spin_unlock(&inode->i_lock); 1365 spin_unlock(&inode->i_lock);
1366 spin_unlock(&wb->list_lock); 1366 spin_unlock(&wb->list_lock);
1367 if (sync)
1368 inode_sync_wait(inode);
1369 return ret; 1367 return ret;
1370} 1368}
1371EXPORT_SYMBOL(write_inode_now); 1369EXPORT_SYMBOL(write_inode_now);