From: Tejun Heo Date: Sun, 7 Sep 2014 23:04:01 +0000 (+0900) Subject: bdi: reimplement bdev_inode_switch_bdi() X-Git-Tag: fixes-against-v3.18-rc2~52^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=018a17bdc8658ad448497c84d4ba21b6985820ec;p=pandora-kernel.git 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 Cc: Alexander Viro Signed-off-by: Jens Axboe --- Reading git-diff-tree failed