We added a new error path to insert_inode_locked() but we need to drop the inode_hash_lock spin_lock before we return. Fixes: 397127e49ff5 ("new primitive: discard_new_inode()") Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> diff --git a/fs/inode.c b/fs/inode.c index 593d0cfce27c..ed7c18495cd9 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -1462,6 +1462,7 @@ int insert_inode_locked(struct inode *inode) } if (unlikely(old->i_state & I_CREATING)) { spin_unlock(&old->i_lock); + spin_unlock(&inode_hash_lock); return -EBUSY; } __iget(old);