diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-04-12 12:45:25 -0400 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-05-15 09:55:44 +0200 |
commit | ecb80519f763ad6d60fbdc143941e1afac4de3f6 (patch) | |
tree | 965e8fc20ae722e6f564aa7e7d654f4e43ee23f6 /fs/ext4 | |
parent | afeeb0349158c4f63285dd148eee0348581d723a (diff) |
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().
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
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 3da21945ff1f..1b890101397b 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)) |