mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 23:09:29 +02:00
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:
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user