From: Jens Axboe Date: Tue, 5 Jun 2007 09:05:11 +0000 (+0200) Subject: splice: move balance_dirty_pages_ratelimited() outside of splice actor X-Git-Tag: v2.6.22-rc5~56^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20d698db67059a63d217030dfd02872cb5f88dfb;p=linux-2.6 splice: move balance_dirty_pages_ratelimited() outside of splice actor I've seen inode related deadlocks, so move this call outside of the actor itself, which may hold the inode lock. Signed-off-by: Jens Axboe --- diff --git a/fs/splice.c b/fs/splice.c index b78a7f057b..6349d3189e 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -652,7 +652,6 @@ find_page: * accessed, we are now done! */ mark_page_accessed(page); - balance_dirty_pages_ratelimited(mapping); out: page_cache_release(page); unlock_page(page); @@ -823,6 +822,7 @@ generic_file_splice_write_nolock(struct pipe_inode_info *pipe, struct file *out, if (err) ret = err; } + balance_dirty_pages_ratelimited(mapping); } return ret; @@ -876,6 +876,7 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out, if (err) ret = err; } + balance_dirty_pages_ratelimited(mapping); } return ret;