Mikulas Patocka 5657e8fa45 dm: use i_size_read
Use i_size_read() instead of reading i_size.

If someone changes the size of the device simultaneously, i_size_read
is guaranteed to return a valid value (either the old one or the new one).

i_size can return some intermediate invalid value (on 32-bit computers
with 64-bit i_size, the reads to both halves of i_size can be interleaved
with updates to i_size, resulting in garbage being returned).

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-06-22 10:12:14 +01:00
..
2009-04-02 19:55:28 +01:00
2009-06-22 10:12:14 +01:00
2009-04-02 19:55:24 +01:00
2009-04-09 00:27:17 +01:00
2009-04-09 00:27:13 +01:00
2009-06-22 10:12:14 +01:00
2009-06-22 10:12:14 +01:00
2009-04-09 00:27:13 +01:00
2009-03-31 14:57:37 +11:00