[3.13.y.z extended stable] Patch "ext4: use i_size_read in ext4_unaligned_aio()" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Tue Jun 10 18:46:30 UTC 2014


This is a note to let you know that I have just added a patch titled

    ext4: use i_size_read in ext4_unaligned_aio()

to the linux-3.13.y-queue branch of the 3.13.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.13.y-queue

This patch is scheduled to be released in version 3.13.11.3.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 5b1196566c11243a97d1d7bcf3d3d7ea0cef4f7e Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso at mit.edu>
Date: Sat, 12 Apr 2014 12:45:25 -0400
Subject: 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 at mit.edu>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 fs/ext4/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 3da2194..1b89010 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))
--
1.9.1





More information about the kernel-team mailing list