]> 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>
Thu, 7 Feb 2013 01:26:05 +0000 (12:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:46:12 +0000 (16:46 +1100)
commit1c9763f72048f80d551e554c4bd76fc4950908c9
treefd778782566549dfd0520b768ee259b5f3918619
parent856ee6eb2c1c2e44553639c2ec37d813686552f4
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