udf: Use sync_inode_metadata() to writeout IS_SYNC inode

When setting inode size we directly writeout inode in udf_setsize().
This misses proper writeout of other inode related metadata. Use
sync_inode_metadata() instead and move the flushing to udf_setattr() to
avoid it for udf_evict_inode() where it would be pointless.

Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260727104923.3828017-31-jack@suse.cz
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
Jan Kara
2026-07-27 16:25:32 +02:00
committed by Christian Brauner
parent 1ec98214cc
commit 061d83911d
2 changed files with 3 additions and 4 deletions
+2
View File
@@ -246,6 +246,8 @@ static int udf_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
setattr_copy(&nop_mnt_idmap, inode, attr);
mark_inode_dirty(inode);
if (IS_SYNC(inode))
sync_inode_metadata(inode, 1);
return 0;
}
+1 -4
View File
@@ -1328,10 +1328,7 @@ set_size:
}
update_time:
inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode));
if (IS_SYNC(inode))
udf_sync_inode(inode);
else
mark_inode_dirty(inode);
mark_inode_dirty(inode);
return err;
}