lkml.org 
[lkml]   [2020]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.7 029/179] exfat: fix wrong size update of stream entry by typo
    Date
    From: Hyeongseok Kim <hyeongseok@gmail.com>

    commit 41e3928f8c58184fcf0bb22e822af39a436370c7 upstream.

    The stream.size field is updated to the value of create timestamp
    of the file entry. Fix this to use correct stream entry pointer.

    Fixes: 29bbb14bfc80 ("exfat: fix incorrect update of stream entry in __exfat_truncate()")
    Signed-off-by: Hyeongseok Kim <hyeongseok@gmail.com>
    Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

    --- a/fs/exfat/file.c
    +++ b/fs/exfat/file.c
    @@ -175,7 +175,7 @@ int __exfat_truncate(struct inode *inode
    ep2->dentry.stream.size = 0;
    } else {
    ep2->dentry.stream.valid_size = cpu_to_le64(new_size);
    - ep2->dentry.stream.size = ep->dentry.stream.valid_size;
    + ep2->dentry.stream.size = ep2->dentry.stream.valid_size;
    }

    if (new_size == 0) {

    \
     
     \ /
      Last update: 2020-07-27 16:20    [W:3.699 / U:0.336 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site