summaryrefslogtreecommitdiff
path: root/fs/exfat/file.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-03-01 19:42:27 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2023-03-01 19:42:27 +0300
commite103ecedceb37b565962a199c75dd4df57742d50 (patch)
treea509773c05c289db6a7bda0dfa9ce87e33338507 /fs/exfat/file.c
parentc0927a7a5391f7d8e593e5e50ead7505a23cadf9 (diff)
parentd5c514b6a0c0b77ed7e5ef2484e8b20eb09c5f27 (diff)
downloadlinux-e103ecedceb37b565962a199c75dd4df57742d50.tar.xz
Merge tag 'exfat-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat
Pull exfat updates from Namjae Jeon: - Handle vendor extension and allocation entries as unrecognized benign secondary entries - Fix wrong ->i_blocks on devices with non-512 byte sector - Add the check to avoid returning -EIO from exfat_readdir() at current position exceeding the directory size - Fix a bug that reach the end of the directory stream at a position not aligned with the dentry size - Redefine DIR_DELETED as 0xFFFFFFF7, the bad cluster number - Two cleanup fixes and fix cluster leakage in error handling * tag 'exfat-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: fix the newly allocated clusters are not freed in error handling exfat: don't print error log in normal case exfat: remove unneeded code from exfat_alloc_cluster() exfat: handle unreconized benign secondary entries exfat: fix inode->i_blocks for non-512 byte sector size device exfat: redefine DIR_DELETED as the bad cluster number exfat: fix reporting fs error when reading dir beyond EOF exfat: fix unexpected EOF while reading dir
Diffstat (limited to 'fs/exfat/file.c')
-rw-r--r--fs/exfat/file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/exfat/file.c b/fs/exfat/file.c
index 1fdb0a64b91d..e99183a74611 100644
--- a/fs/exfat/file.c
+++ b/fs/exfat/file.c
@@ -209,8 +209,7 @@ void exfat_truncate(struct inode *inode)
if (err)
goto write_size;
- inode->i_blocks = round_up(i_size_read(inode), sbi->cluster_size) >>
- inode->i_blkbits;
+ inode->i_blocks = round_up(i_size_read(inode), sbi->cluster_size) >> 9;
write_size:
aligned_size = i_size_read(inode);
if (aligned_size & (blocksize - 1)) {