ext4: use i_size_read in ext4_unaligned_aio()
Theodore Ts'o
maintainerPATCH 1/1 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" <[email protected]>
--- fs/ext4/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/file.c +1 -1
@@ -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))
Signature · 1 line
1.9.0
Quoted 4 lines · Theodore Ts'o
We haven't taken
i_mutexyet, so we need to usei_size_read().Signed-off-by "Theodore Ts'o" <[email protected]>
Reviewed-by Zheng Liu <[email protected]>
- Zheng
Quoted 24 lines
--- fs/ext4/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ext4/file.c +1
-1@@ -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))Signature · 6 lines
1.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html