Re: [PATCH 04/13] fat: only specify I_DIRTY_TIME when needed in fat_update_time()

From
Jan Kara <jack@suse.cz>
Date
2021-01-07 13:14:12
Also in
linux-ext4, linux-f2fs-devel, linux-fsdevel
Reply to
Eric Biggers, 2021-01-05
On Mon 04-01-21 16:54:43, Eric Biggers wrote:
From: Eric Biggers <redacted>

As was done for generic_update_time(), only pass I_DIRTY_TIME to
__mark_inode_dirty() when the inode's timestamps were actually updated
and lazytime is enabled.  This avoids a weird edge case where
I_DIRTY_TIME could be set in i_state when lazytime isn't enabled.

Signed-off-by: Eric Biggers <redacted>
...
quoted hunk ↗ jump to hunk
+	if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false))
+		dirty_flags |= I_DIRTY_SYNC;
 
-	if (dirty)
-		iflags |= I_DIRTY_SYNC;
 	__mark_inode_dirty(inode, iflags);
				  ^^^ dirty_flags here?

Otherwise the change looks good to me.

								Honza
-- 
Jan Kara [off-list ref]
SUSE Labs, CR
Thread (37 messages) 37 messages, 4 authors, last reply 2021-01-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help