@@ -793,11 +793,6 @@ static int udf_rename(struct mnt_idmap *idmap, struct inode *old_dir,
793
793
if (!empty_dir (new_inode ))
794
794
goto out_oiter ;
795
795
}
796
- /*
797
- * We need to protect against old_inode getting converted from
798
- * ICB to normal directory.
799
- */
800
- inode_lock_nested (old_inode , I_MUTEX_NONDIR2 );
801
796
retval = udf_fiiter_find_entry (old_inode , & dotdot_name ,
802
797
& diriter );
803
798
if (retval == - ENOENT ) {
@@ -806,10 +801,8 @@ static int udf_rename(struct mnt_idmap *idmap, struct inode *old_dir,
806
801
old_inode -> i_ino );
807
802
retval = - EFSCORRUPTED ;
808
803
}
809
- if (retval ) {
810
- inode_unlock (old_inode );
804
+ if (retval )
811
805
goto out_oiter ;
812
- }
813
806
has_diriter = true;
814
807
tloc = lelb_to_cpu (diriter .fi .icb .extLocation );
815
808
if (udf_get_lb_pblock (old_inode -> i_sb , & tloc , 0 ) !=
@@ -889,7 +882,6 @@ static int udf_rename(struct mnt_idmap *idmap, struct inode *old_dir,
889
882
udf_dir_entry_len (& diriter .fi ));
890
883
udf_fiiter_write_fi (& diriter , NULL );
891
884
udf_fiiter_release (& diriter );
892
- inode_unlock (old_inode );
893
885
894
886
inode_dec_link_count (old_dir );
895
887
if (new_inode )
@@ -901,10 +893,8 @@ static int udf_rename(struct mnt_idmap *idmap, struct inode *old_dir,
901
893
}
902
894
return 0 ;
903
895
out_oiter :
904
- if (has_diriter ) {
896
+ if (has_diriter )
905
897
udf_fiiter_release (& diriter );
906
- inode_unlock (old_inode );
907
- }
908
898
udf_fiiter_release (& oiter );
909
899
910
900
return retval ;
0 commit comments