mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-04 07:07:58 +07:00
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 <jens.axboe@oracle.com>
This commit is contained in:
parent
17374ff1aa
commit
20d698db67
@ -652,7 +652,6 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
|
|||||||
* accessed, we are now done!
|
* accessed, we are now done!
|
||||||
*/
|
*/
|
||||||
mark_page_accessed(page);
|
mark_page_accessed(page);
|
||||||
balance_dirty_pages_ratelimited(mapping);
|
|
||||||
out:
|
out:
|
||||||
page_cache_release(page);
|
page_cache_release(page);
|
||||||
unlock_page(page);
|
unlock_page(page);
|
||||||
@ -823,6 +822,7 @@ generic_file_splice_write_nolock(struct pipe_inode_info *pipe, struct file *out,
|
|||||||
if (err)
|
if (err)
|
||||||
ret = err;
|
ret = err;
|
||||||
}
|
}
|
||||||
|
balance_dirty_pages_ratelimited(mapping);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -876,6 +876,7 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
|
|||||||
if (err)
|
if (err)
|
||||||
ret = err;
|
ret = err;
|
||||||
}
|
}
|
||||||
|
balance_dirty_pages_ratelimited(mapping);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user