mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
bdi: reimplement bdev_inode_switch_bdi()
A block_device may be attached to different gendisks and thus different bdis over time. bdev_inode_switch_bdi() is used to switch the associated bdi. The function assumes that the inode could be dirty and transfers it between bdis if so. This is a bit nasty in that it reaches into bdi internals. This patch reimplements the function so that it writes out the inode if dirty. This is a lot simpler and can be implemented without exposing bdi internals. Signed-off-by: Tejun Heo <[email protected]> Cc: Alexander Viro <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
1a1e4530ea
commit
018a17bdc8
3 changed files with 12 additions and 23 deletions
|
|
@ -40,7 +40,7 @@ LIST_HEAD(bdi_list);
|
|||
/* bdi_wq serves all asynchronous writeback tasks */
|
||||
struct workqueue_struct *bdi_wq;
|
||||
|
||||
void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2)
|
||||
static void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2)
|
||||
{
|
||||
if (wb1 < wb2) {
|
||||
spin_lock(&wb1->list_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue