Patch "exfat: fix timing of synchronizing bitmap and inode" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    exfat: fix timing of synchronizing bitmap and inode

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     exfat-fix-timing-of-synchronizing-bitmap-and-inode.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b5b7ee44b4596212d7bbba547d3e1cbb99695f3f
Author: Yuezhang Mo <Yuezhang.Mo@xxxxxxxx>
Date:   Sun Mar 31 23:38:17 2024 +0900

    exfat: fix timing of synchronizing bitmap and inode
    
    [ Upstream commit d7ed5232f0f16181506373d73e711190d5e0c868 ]
    
    Commit(f55c096f62f1 exfat: do not zero the extended part) changed
    the timing of synchronizing bitmap and inode in exfat_cont_expand().
    The change caused xfstests generic/013 to fail if 'dirsync' or 'sync'
    is enabled. So this commit restores the timing.
    
    Fixes: f55c096f62f1 ("exfat: do not zero the extended part")
    Signed-off-by: Yuezhang Mo <Yuezhang.Mo@xxxxxxxx>
    Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/exfat/file.c b/fs/exfat/file.c
index cc00f1a7a1e18..9adfc38ca7dac 100644
--- a/fs/exfat/file.c
+++ b/fs/exfat/file.c
@@ -51,7 +51,7 @@ static int exfat_cont_expand(struct inode *inode, loff_t size)
 	clu.flags = ei->flags;
 
 	ret = exfat_alloc_cluster(inode, new_num_clusters - num_clusters,
-			&clu, IS_DIRSYNC(inode));
+			&clu, inode_needs_sync(inode));
 	if (ret)
 		return ret;
 
@@ -77,12 +77,11 @@ static int exfat_cont_expand(struct inode *inode, loff_t size)
 	ei->i_size_aligned = round_up(size, sb->s_blocksize);
 	ei->i_size_ondisk = ei->i_size_aligned;
 	inode->i_blocks = round_up(size, sbi->cluster_size) >> 9;
+	mark_inode_dirty(inode);
 
-	if (IS_DIRSYNC(inode))
+	if (IS_SYNC(inode))
 		return write_inode_now(inode, 1);
 
-	mark_inode_dirty(inode);
-
 	return 0;
 
 free_clu:




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux