diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 897154e993800..f28999f717761 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -2166,7 +2166,8 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, out_inserted_sd: clear_nlink(inode); th->t_trans_id = 0; /* so the caller can't use this handle later */ - unlock_new_inode(inode); /* OK to do even if we hadn't locked it */ + if (inode->i_state & I_NEW) + unlock_new_inode(inode); iput(inode); return err; }