Skip to content

Commit

Permalink
exfat: fix wrong size update of stream entry by typo
Browse files Browse the repository at this point in the history
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: 29bbb14 ("exfat: fix incorrect update of stream entry in __exfat_truncate()")
Signed-off-by: Hyeongseok Kim <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
hyeongseok-kim901 authored and namjaejeon committed Jul 21, 2020
1 parent d2fa0c3 commit 41e3928
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/exfat/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ int __exfat_truncate(struct inode *inode, loff_t new_size)
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) {
Expand Down

0 comments on commit 41e3928

Please sign in to comment.