ocfs2: Use filemap_write_and_wait() instead of write_inode_now()
authorJan Kara <jack@suse.cz>
Mon, 7 Nov 2011 23:20:39 +0000 (00:20 +0100)
committerJoel Becker <jlbec@evilplan.org>
Thu, 17 Nov 2011 10:18:57 +0000 (02:18 -0800)
Since ocfs2 has no ->write_inode method, there's no point in calling
write_inode_now() from ocfs2_cleanup_delete_inode().  Use
filemap_write_and_wait() instead. This helps us to cleanup inode writing
interfaces...

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
fs/ocfs2/inode.c

index b4c8bb6b8d281f74feb175580696eb1169819677..c4bf6ac4a0bb15172467b8deda9291bccc34efba 100644 (file)
@@ -951,7 +951,7 @@ static void ocfs2_cleanup_delete_inode(struct inode *inode,
        trace_ocfs2_cleanup_delete_inode(
                (unsigned long long)OCFS2_I(inode)->ip_blkno, sync_data);
        if (sync_data)
-               write_inode_now(inode, 1);
+               filemap_write_and_wait(inode->i_mapping);
        truncate_inode_pages(&inode->i_data, 0);
 }