Skip to content

Commit

Permalink
splice: move balance_dirty_pages_ratelimited() outside of splice actor
Browse files Browse the repository at this point in the history
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 <jens.axboe@oracle.com>
  • Loading branch information
Jens Axboe committed Jun 8, 2007
1 parent 17374ff commit 20d698d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 20d698d

Please sign in to comment.