lkml.org 
[lkml]   [2014]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.14 152/158] ext4: use i_size_read in ext4_unaligned_aio()
    Date
    3.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Theodore Ts'o <tytso@mit.edu>

    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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/ext4/file.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/fs/ext4/file.c
    +++ b/fs/ext4/file.c
    @@ -82,7 +82,7 @@ ext4_unaligned_aio(struct inode *inode,
    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))



    \
     
     \ /
      Last update: 2014-05-04 19:41    [W:2.397 / U:0.516 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site