@@ -903,28 +903,27 @@ static noinline int btrfs_mksubvol(const struct path *parent,
903
903
struct btrfs_fs_info * fs_info = inode_to_fs_info (dir );
904
904
struct dentry * dentry ;
905
905
struct fscrypt_str name_str = FSTR_INIT ((char * )name , namelen );
906
- int error ;
906
+ int ret ;
907
907
908
- error = down_write_killable_nested (& dir -> i_rwsem , I_MUTEX_PARENT );
909
- if (error == - EINTR )
910
- return error ;
908
+ ret = down_write_killable_nested (& dir -> i_rwsem , I_MUTEX_PARENT );
909
+ if (ret == - EINTR )
910
+ return ret ;
911
911
912
912
dentry = lookup_one (idmap , & QSTR_LEN (name , namelen ), parent -> dentry );
913
- error = PTR_ERR (dentry );
913
+ ret = PTR_ERR (dentry );
914
914
if (IS_ERR (dentry ))
915
915
goto out_unlock ;
916
916
917
- error = btrfs_may_create (idmap , dir , dentry );
918
- if (error )
917
+ ret = btrfs_may_create (idmap , dir , dentry );
918
+ if (ret )
919
919
goto out_dput ;
920
920
921
921
/*
922
922
* even if this name doesn't exist, we may get hash collisions.
923
923
* check for them now when we can safely fail
924
924
*/
925
- error = btrfs_check_dir_item_collision (BTRFS_I (dir )-> root ,
926
- dir -> i_ino , & name_str );
927
- if (error )
925
+ ret = btrfs_check_dir_item_collision (BTRFS_I (dir )-> root , dir -> i_ino , & name_str );
926
+ if (ret )
928
927
goto out_dput ;
929
928
930
929
down_read (& fs_info -> subvol_sem );
@@ -933,19 +932,19 @@ static noinline int btrfs_mksubvol(const struct path *parent,
933
932
goto out_up_read ;
934
933
935
934
if (snap_src )
936
- error = create_snapshot (snap_src , dir , dentry , readonly , inherit );
935
+ ret = create_snapshot (snap_src , dir , dentry , readonly , inherit );
937
936
else
938
- error = create_subvol (idmap , dir , dentry , inherit );
937
+ ret = create_subvol (idmap , dir , dentry , inherit );
939
938
940
- if (!error )
939
+ if (!ret )
941
940
fsnotify_mkdir (dir , dentry );
942
941
out_up_read :
943
942
up_read (& fs_info -> subvol_sem );
944
943
out_dput :
945
944
dput (dentry );
946
945
out_unlock :
947
946
btrfs_inode_unlock (BTRFS_I (dir ), 0 );
948
- return error ;
947
+ return ret ;
949
948
}
950
949
951
950
static noinline int btrfs_mksnapshot (const struct path * parent ,
0 commit comments