The patch titled Subject: block: use i_size_write() in bd_set_size() has been added to the -mm tree. Its filename is block-use-i_size_write-in-bd_set_size.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Guo Chao <yan@xxxxxxxxxxxxxxxxxx> Subject: 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@xxxxxxxxxxxxxxxxxx> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Guo Chao <yan@xxxxxxxxxxxxxxxxxx> Cc: M. Hindess <hindessm@xxxxxxxxxx> Cc: Nikanth Karthikesan <knikanth@xxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/block_dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN fs/block_dev.c~block-use-i_size_write-in-bd_set_size fs/block_dev.c --- a/fs/block_dev.c~block-use-i_size_write-in-bd_set_size +++ a/fs/block_dev.c @@ -1033,7 +1033,9 @@ void bd_set_size(struct block_device *bd { unsigned bsize = bdev_logical_block_size(bdev); - bdev->bd_inode->i_size = size; + mutex_lock(&bdev->bd_inode->i_mutex); + i_size_write(bdev->bd_inode, size); + mutex_unlock(&bdev->bd_inode->i_mutex); while (bsize < PAGE_CACHE_SIZE) { if (size & bsize) break; _ Patches currently in -mm which might be from yan@xxxxxxxxxxxxxxxxxx are linux-next.patch block-use-i_size_write-in-bd_set_size.patch block-remove-redundant-check-to-bd_openers.patch loopdev-fix-a-deadlock.patch loopdev-update-block-device-size-in-loop_set_status.patch loopdev-move-common-code-into-loop_figure_size.patch loopdev-remove-an-user-triggerable-oops.patch loopdev-ignore-negative-offset-when-calculate-loop-device-size.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html