summaryrefslogtreecommitdiffstats
path: root/fs/ext4/file.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2014-04-12 12:45:25 -0400
committerTheodore Ts'o <tytso@mit.edu>2014-04-12 12:45:25 -0400
commit6e6358fc3c3c862bfe9a5bc029d3f8ce43dc9765 (patch)
treee7593554fc5088d7409d4f9c126f5b7697607973 /fs/ext4/file.c
parent0790b31b69374ddadefebb156251b319e5b43345 (diff)
downloadop-kernel-dev-6e6358fc3c3c862bfe9a5bc029d3f8ce43dc9765.zip
op-kernel-dev-6e6358fc3c3c862bfe9a5bc029d3f8ce43dc9765.tar.gz
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
Diffstat (limited to 'fs/ext4/file.c')
-rw-r--r--fs/ext4/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 6db7f7d..bc76559 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -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))
OpenPOWER on IntegriCloud