diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-04-12 12:45:25 -0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2014-05-18 14:58:03 +0100 |
commit | 0289029f8bbdada97ee659ff4d9ac17940b56844 (patch) | |
tree | 829fcc0071d5cf814a5a2a0edf269b6b6fb408bd /fs/ext4 | |
parent | 81692a1db0ee5276e3dcae9335346ba9712b93ce (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: Ben Hutchings <ben@decadent.org.uk>
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 cb70f1812a70..61999221fbfa 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -80,7 +80,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)) |