1 ext4: use i_size_read in ext4_unaligned_aio()
3 We haven't taken i_mutex yet, so we need to use i_size_read().
5 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
6 Cc: stable@vger.kernel.org
9 1 file changed, 1 insertion(+), 1 deletion(-)
11 diff --git a/fs/ext4/file.c b/fs/ext4/file.c
12 index 6db7f7d..bc76559 100644
15 @@ -82,7 +82,7 @@ ext4_unaligned_aio(struct inode *inode, const struct iovec *iov,
16 size_t count = iov_length(iov, nr_segs);
17 loff_t final_size = pos + count;
19 - if (pos >= inode->i_size)
20 + if (pos >= i_size_read(inode))
23 if ((pos & blockmask) || (final_size & blockmask))