Skip to content

Commit ddd4cd4

Browse files
mjguzikbrauner
authored andcommitted
xfs: preserve i_state around inode_init_always in xfs_reinit_inode
This is in preparation for the routine starting to zero the field. De facto coded by Dave Chinner, see: https://lore.kernel.org/linux-fsdevel/[email protected]/ Signed-off-by: Mateusz Guzik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent 3a8e2f9 commit ddd4cd4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/xfs/xfs_icache.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ xfs_reinit_inode(
314314
dev_t dev = inode->i_rdev;
315315
kuid_t uid = inode->i_uid;
316316
kgid_t gid = inode->i_gid;
317+
unsigned long state = inode->i_state;
317318

318319
error = inode_init_always(mp->m_super, inode);
319320

@@ -324,6 +325,7 @@ xfs_reinit_inode(
324325
inode->i_rdev = dev;
325326
inode->i_uid = uid;
326327
inode->i_gid = gid;
328+
inode->i_state = state;
327329
mapping_set_large_folios(inode->i_mapping);
328330
return error;
329331
}

0 commit comments

Comments
 (0)