]> git.karo-electronics.de Git - karo-tx-linux.git/commit
block: use i_size_write() in bd_set_size()
authorGuo Chao <yan@linux.vnet.ibm.com>
Wed, 20 Feb 2013 02:13:53 +0000 (13:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:16 +0000 (16:52 +1100)
commite1b20bca11278c76a6d4a89576dcd39eef8e4a15
treee823fb340584a9a8626e402ea64354f992099b28
parentd7e8e4d4535a3b659478354d8cc2bbc3dece9560
block: use i_size_write() in bd_set_size()

blkdev_ioctl(GETBLKSIZE) uses i_size_read() to read size of block device.
If we update block size directly, reader may see intermediate result in
some machines and configurations.  Use i_size_write() instead.

Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Guo Chao <yan@linux.vnet.ibm.com>
Cc: M. Hindess <hindessm@uk.ibm.com>
Cc: Nikanth Karthikesan <knikanth@suse.de>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/block_dev.c