ext4: use i_size_read in ext4_unaligned_aio()

We haven't taken i_mutex yet, so we need to use i_size_read().

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
This commit is contained in:
Theodore Ts'o 2014-04-12 12:45:25 -04:00
parent 0790b31b69
commit 6e6358fc3c
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ ext4_unaligned_aio(struct inode *inode, const struct iovec *iov,
size_t count = iov_length(iov, nr_segs);
loff_t final_size = pos + count;
if (pos >= inode->i_size)
if (pos >= i_size_read(inode))
return 0;
if ((pos & blockmask) || (final_size & blockmask))