block: read i_size with i_size_read()
authorMike Snitzer <snitzer@redhat.com>
Mon, 8 Nov 2010 13:39:12 +0000 (14:39 +0100)
committerJens Axboe <jaxboe@fusionio.com>
Wed, 10 Nov 2010 13:40:53 +0000 (14:40 +0100)
commit77304d2abac6101f7249754ffdd4421258877ab0
tree8ee5914529d70120528a630a8e904c22f8c4f98c
parent90fdb0b98a62d78a0650b9fd3ddc58a48f71d740
block: read i_size with i_size_read()

Convert direct reads of an inode's i_size to using i_size_read().

i_size_{read,write} use a seqcount to protect reads from accessing
incomple writes.  Concurrent i_size_write()s require mutual exclussion
to protect the seqcount that is used by i_size_{read,write}.  But
i_size_read() callers do not need to use additional locking.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: NeilBrown <neilb@suse.de>
Acked-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/blk-core.c
block/compat_ioctl.c
block/ioctl.c
drivers/block/drbd/drbd_int.h
drivers/md/md.c