diff --git a/fs/splice.c b/fs/splice.c index b78a7f057be150d63906fe7fd875104206de548f..6349d3189e3f8b02b04331e6c0dea6af1ace70aa 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -652,7 +652,6 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf, * 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;