mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 08:10:54 +07:00
ovl: set I_CREATING on inode being created
...otherwise there will be list corruption due to inode_sb_list_add() being
called for inode already on the sb list.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: e950564b97
("vfs: don't evict uninitialized inode")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
cd9b44f907
commit
6faf05c2b2
@ -603,6 +603,10 @@ static int ovl_create_object(struct dentry *dentry, int mode, dev_t rdev,
|
||||
if (!inode)
|
||||
goto out_drop_write;
|
||||
|
||||
spin_lock(&inode->i_lock);
|
||||
inode->i_state |= I_CREATING;
|
||||
spin_unlock(&inode->i_lock);
|
||||
|
||||
inode_init_owner(inode, dentry->d_parent->d_inode, mode);
|
||||
attr.mode = inode->i_mode;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user