From: Christoph Hellwig Date: Wed, 14 Jan 2015 09:42:33 +0000 (+0100) Subject: block_dev: only write bdev inode on close X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~103^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=564f00f6c03a9339c259eb71a5b3aa8ef7ff1c2e;p=pandora-kernel.git block_dev: only write bdev inode on close Since 018a17bdc865 ("bdi: reimplement bdev_inode_switch_bdi()") the block device code writes out all dirty data whenever switching the backing_dev_info for a block device inode. But a block device inode can only be dirtied when it is in use, which means we only have to write it out on the final blkdev_put, but not when doing a blkdev_get. Factoring out the write out from the bdi list switch prepares from removing the list switch later in the series. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Reviewed-by: Jan Kara Signed-off-by: Jens Axboe --- Reading git-diff-tree failed