diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-04-12 12:45:25 -0400 |
---|---|---|
committer | Qiming Wu <wuqm@marvell.com> | 2014-11-19 18:42:13 +0800 |
commit | 11a57cb13054d627fddbc5715364266f297a58e6 (patch) | |
tree | 731df967f23596f0e0ebb1a6380869eceb02d828 /fs/ext4 | |
parent | ab2d467e133101a431b67ce10e3469e8e293bea8 (diff) | |
download | pxa-v3.14-11a57cb13054d627fddbc5715364266f297a58e6.tar.gz |
ext4: use i_size_read in ext4_unaligned_aio()
commit 6e6358fc3c3c862bfe9a5bc029d3f8ce43dc9765 upstream.
We haven't taken i_mutex yet, so we need to use i_size_read().
Change-Id: Ia62f87183e4a23386a0a810bd0f4424c27fb0aa2
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jialing Fu <jlfu@marvell.com>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 1a5073959f3..2a8b2e15dcc 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)) |