@@ -4221,7 +4221,7 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info)
4221
4221
struct reloc_control * rc = NULL ;
4222
4222
struct btrfs_trans_handle * trans ;
4223
4223
int ret2 ;
4224
- int err = 0 ;
4224
+ int ret = 0 ;
4225
4225
4226
4226
path = btrfs_alloc_path ();
4227
4227
if (!path )
@@ -4233,16 +4233,16 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info)
4233
4233
key .offset = (u64 )- 1 ;
4234
4234
4235
4235
while (1 ) {
4236
- err = btrfs_search_slot (NULL , fs_info -> tree_root , & key ,
4236
+ ret = btrfs_search_slot (NULL , fs_info -> tree_root , & key ,
4237
4237
path , 0 , 0 );
4238
- if (err < 0 )
4238
+ if (ret < 0 )
4239
4239
goto out ;
4240
- if (err > 0 ) {
4240
+ if (ret > 0 ) {
4241
4241
if (path -> slots [0 ] == 0 )
4242
4242
break ;
4243
4243
path -> slots [0 ]-- ;
4244
4244
}
4245
- err = 0 ;
4245
+ ret = 0 ;
4246
4246
leaf = path -> nodes [0 ];
4247
4247
btrfs_item_key_to_cpu (leaf , & key , path -> slots [0 ]);
4248
4248
btrfs_release_path (path );
@@ -4253,7 +4253,7 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info)
4253
4253
4254
4254
reloc_root = btrfs_read_tree_root (fs_info -> tree_root , & key );
4255
4255
if (IS_ERR (reloc_root )) {
4256
- err = PTR_ERR (reloc_root );
4256
+ ret = PTR_ERR (reloc_root );
4257
4257
goto out ;
4258
4258
}
4259
4259
@@ -4264,13 +4264,13 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info)
4264
4264
fs_root = btrfs_get_fs_root (fs_info ,
4265
4265
reloc_root -> root_key .offset , false);
4266
4266
if (IS_ERR (fs_root )) {
4267
- err = PTR_ERR (fs_root );
4268
- if (err != - ENOENT )
4267
+ ret = PTR_ERR (fs_root );
4268
+ if (ret != - ENOENT )
4269
4269
goto out ;
4270
- err = mark_garbage_root (reloc_root );
4271
- if (err < 0 )
4270
+ ret = mark_garbage_root (reloc_root );
4271
+ if (ret < 0 )
4272
4272
goto out ;
4273
- err = 0 ;
4273
+ ret = 0 ;
4274
4274
} else {
4275
4275
btrfs_put_root (fs_root );
4276
4276
}
@@ -4288,12 +4288,12 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info)
4288
4288
4289
4289
rc = alloc_reloc_control (fs_info );
4290
4290
if (!rc ) {
4291
- err = - ENOMEM ;
4291
+ ret = - ENOMEM ;
4292
4292
goto out ;
4293
4293
}
4294
4294
4295
- err = reloc_chunk_start (fs_info );
4296
- if (err < 0 )
4295
+ ret = reloc_chunk_start (fs_info );
4296
+ if (ret < 0 )
4297
4297
goto out_end ;
4298
4298
4299
4299
rc -> extent_root = btrfs_extent_root (fs_info , 0 );
@@ -4302,7 +4302,7 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info)
4302
4302
4303
4303
trans = btrfs_join_transaction (rc -> extent_root );
4304
4304
if (IS_ERR (trans )) {
4305
- err = PTR_ERR (trans );
4305
+ ret = PTR_ERR (trans );
4306
4306
goto out_unset ;
4307
4307
}
4308
4308
@@ -4322,15 +4322,15 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info)
4322
4322
fs_root = btrfs_get_fs_root (fs_info , reloc_root -> root_key .offset ,
4323
4323
false);
4324
4324
if (IS_ERR (fs_root )) {
4325
- err = PTR_ERR (fs_root );
4325
+ ret = PTR_ERR (fs_root );
4326
4326
list_add_tail (& reloc_root -> root_list , & reloc_roots );
4327
4327
btrfs_end_transaction (trans );
4328
4328
goto out_unset ;
4329
4329
}
4330
4330
4331
- err = __add_reloc_root (reloc_root );
4332
- ASSERT (err != - EEXIST );
4333
- if (err ) {
4331
+ ret = __add_reloc_root (reloc_root );
4332
+ ASSERT (ret != - EEXIST );
4333
+ if (ret ) {
4334
4334
list_add_tail (& reloc_root -> root_list , & reloc_roots );
4335
4335
btrfs_put_root (fs_root );
4336
4336
btrfs_end_transaction (trans );
@@ -4340,8 +4340,8 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info)
4340
4340
btrfs_put_root (fs_root );
4341
4341
}
4342
4342
4343
- err = btrfs_commit_transaction (trans );
4344
- if (err )
4343
+ ret = btrfs_commit_transaction (trans );
4344
+ if (ret )
4345
4345
goto out_unset ;
4346
4346
4347
4347
merge_reloc_roots (rc );
@@ -4350,14 +4350,14 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info)
4350
4350
4351
4351
trans = btrfs_join_transaction (rc -> extent_root );
4352
4352
if (IS_ERR (trans )) {
4353
- err = PTR_ERR (trans );
4353
+ ret = PTR_ERR (trans );
4354
4354
goto out_clean ;
4355
4355
}
4356
- err = btrfs_commit_transaction (trans );
4356
+ ret = btrfs_commit_transaction (trans );
4357
4357
out_clean :
4358
4358
ret2 = clean_dirty_subvols (rc );
4359
- if (ret2 < 0 && !err )
4360
- err = ret2 ;
4359
+ if (ret2 < 0 && !ret )
4360
+ ret = ret2 ;
4361
4361
out_unset :
4362
4362
unset_reloc_control (rc );
4363
4363
out_end :
@@ -4368,14 +4368,14 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info)
4368
4368
4369
4369
btrfs_free_path (path );
4370
4370
4371
- if (err == 0 ) {
4371
+ if (ret == 0 ) {
4372
4372
/* cleanup orphan inode in data relocation tree */
4373
4373
fs_root = btrfs_grab_root (fs_info -> data_reloc_root );
4374
4374
ASSERT (fs_root );
4375
- err = btrfs_orphan_cleanup (fs_root );
4375
+ ret = btrfs_orphan_cleanup (fs_root );
4376
4376
btrfs_put_root (fs_root );
4377
4377
}
4378
- return err ;
4378
+ return ret ;
4379
4379
}
4380
4380
4381
4381
/*
0 commit comments