]> Git Repo - linux.git/commitdiff
exfat: fix wrong size update of stream entry by typo
authorHyeongseok Kim <[email protected]>
Wed, 8 Jul 2020 09:52:33 +0000 (18:52 +0900)
committerNamjae Jeon <[email protected]>
Tue, 21 Jul 2020 01:44:15 +0000 (10:44 +0900)
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 <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
fs/exfat/file.c

index 3b7fea465fd41e2859a94afac61dd9768a9f3119..a6a063830edcb68944e55fe7308dee1312463b15 100644 (file)
@@ -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) {
This page took 0.045384 seconds and 4 git commands to generate.