Skip to content

Commit 42f3173

Browse files
committed
Merge branch 'cleanups-4.7' into for-chris-4.7-20160525
2 parents e734408 + 0132761 commit 42f3173

36 files changed

+193
-196
lines changed

fs/btrfs/backref.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1939,7 +1939,7 @@ static int inode_to_path(u64 inum, u32 name_len, unsigned long name_off,
19391939
* from ipath->fspath->val[i].
19401940
* when it returns, there are ipath->fspath->elem_cnt number of paths available
19411941
* in ipath->fspath->val[]. when the allocated space wasn't sufficient, the
1942-
* number of missed paths in recored in ipath->fspath->elem_missed, otherwise,
1942+
* number of missed paths is recorded in ipath->fspath->elem_missed, otherwise,
19431943
* it's zero. ipath->fspath->bytes_missing holds the number of bytes that would
19441944
* have been needed to return all paths.
19451945
*/

fs/btrfs/btrfs_inode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ struct btrfs_dio_private {
313313
struct bio *dio_bio;
314314

315315
/*
316-
* The original bio may be splited to several sub-bios, this is
316+
* The original bio may be split to several sub-bios, this is
317317
* done during endio of sub-bios
318318
*/
319319
int (*subio_endio)(struct inode *, struct btrfs_io_bio *, int);

fs/btrfs/check-integrity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1939,7 +1939,7 @@ static void btrfsic_process_written_block(struct btrfsic_dev_state *dev_state,
19391939
/*
19401940
* Clear all references of this block. Do not free
19411941
* the block itself even if is not referenced anymore
1942-
* because it still carries valueable information
1942+
* because it still carries valuable information
19431943
* like whether it was ever written and IO completed.
19441944
*/
19451945
list_for_each_entry_safe(l, tmp, &block->ref_to_list,

fs/btrfs/ctree.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ struct extent_buffer *btrfs_root_node(struct btrfs_root *root)
156156

157157
/*
158158
* RCU really hurts here, we could free up the root node because
159-
* it was cow'ed but we may not get the new root node yet so do
159+
* it was COWed but we may not get the new root node yet so do
160160
* the inc_not_zero dance and if it doesn't work then
161161
* synchronize_rcu and try again.
162162
*/
@@ -955,7 +955,7 @@ int btrfs_block_can_be_shared(struct btrfs_root *root,
955955
struct extent_buffer *buf)
956956
{
957957
/*
958-
* Tree blocks not in refernece counted trees and tree roots
958+
* Tree blocks not in reference counted trees and tree roots
959959
* are never shared. If a block was allocated after the last
960960
* snapshot and the block was not allocated by tree relocation,
961961
* we know the block is not shared.
@@ -1270,7 +1270,7 @@ __tree_mod_log_oldest_root(struct btrfs_fs_info *fs_info,
12701270

12711271
/*
12721272
* tm is a pointer to the first operation to rewind within eb. then, all
1273-
* previous operations will be rewinded (until we reach something older than
1273+
* previous operations will be rewound (until we reach something older than
12741274
* time_seq).
12751275
*/
12761276
static void
@@ -1345,7 +1345,7 @@ __tree_mod_log_rewind(struct btrfs_fs_info *fs_info, struct extent_buffer *eb,
13451345
}
13461346

13471347
/*
1348-
* Called with eb read locked. If the buffer cannot be rewinded, the same buffer
1348+
* Called with eb read locked. If the buffer cannot be rewound, the same buffer
13491349
* is returned. If rewind operations happen, a fresh buffer is returned. The
13501350
* returned buffer is always read-locked. If the returned buffer is not the
13511351
* input buffer, the lock on the input buffer is released and the input buffer
@@ -1516,7 +1516,7 @@ static inline int should_cow_block(struct btrfs_trans_handle *trans,
15161516
* 3) the root is not forced COW.
15171517
*
15181518
* What is forced COW:
1519-
* when we create snapshot during commiting the transaction,
1519+
* when we create snapshot during committing the transaction,
15201520
* after we've finished coping src root, we must COW the shared
15211521
* block to ensure the metadata consistency.
15221522
*/
@@ -1531,7 +1531,7 @@ static inline int should_cow_block(struct btrfs_trans_handle *trans,
15311531

15321532
/*
15331533
* cows a single block, see __btrfs_cow_block for the real work.
1534-
* This version of it has extra checks so that a block isn't cow'd more than
1534+
* This version of it has extra checks so that a block isn't COWed more than
15351535
* once per transaction, as long as it hasn't been written yet
15361536
*/
15371537
noinline int btrfs_cow_block(struct btrfs_trans_handle *trans,
@@ -2986,7 +2986,7 @@ int btrfs_search_old_slot(struct btrfs_root *root, struct btrfs_key *key,
29862986
btrfs_unlock_up_safe(p, level + 1);
29872987

29882988
/*
2989-
* Since we can unwind eb's we want to do a real search every
2989+
* Since we can unwind ebs we want to do a real search every
29902990
* time.
29912991
*/
29922992
prev_cmp = -1;

fs/btrfs/ctree.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static const int btrfs_csum_sizes[] = { 4 };
8989
/* four bytes for CRC32 */
9090
#define BTRFS_EMPTY_DIR_SIZE 0
9191

92-
/* spefic to btrfs_map_block(), therefore not in include/linux/blk_types.h */
92+
/* specific to btrfs_map_block(), therefore not in include/linux/blk_types.h */
9393
#define REQ_GET_READ_MIRRORS (1 << 30)
9494

9595
/* ioprio of readahead is set to idle */
@@ -431,7 +431,7 @@ struct btrfs_space_info {
431431
* bytes_pinned does not reflect the bytes that will be pinned once the
432432
* delayed refs are flushed, so this counter is inc'ed every time we
433433
* call btrfs_free_extent so it is a realtime count of what will be
434-
* freed once the transaction is committed. It will be zero'ed every
434+
* freed once the transaction is committed. It will be zeroed every
435435
* time the transaction commits.
436436
*/
437437
struct percpu_counter total_bytes_pinned;
@@ -1401,7 +1401,7 @@ static inline void btrfs_init_map_token (struct btrfs_map_token *token)
14011401
token->kaddr = NULL;
14021402
}
14031403

1404-
/* some macros to generate set/get funcs for the struct fields. This
1404+
/* some macros to generate set/get functions for the struct fields. This
14051405
* assumes there is a lefoo_to_cpu for every type, so lets make a simple
14061406
* one for u8:
14071407
*/

fs/btrfs/delayed-ref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ struct btrfs_delayed_ref_root {
188188

189189
/*
190190
* To make qgroup to skip given root.
191-
* This is for snapshot, as btrfs_qgroup_inherit() will manully
191+
* This is for snapshot, as btrfs_qgroup_inherit() will manually
192192
* modify counters for snapshot and its source, so we should skip
193193
* the snapshot in new_root/old_roots or it will get calculated twice
194194
*/

fs/btrfs/dev-replace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ int btrfs_dev_replace_by_ioctl(struct btrfs_root *root,
450450
}
451451

452452
/*
453-
* blocked until all flighting bios are finished.
453+
* blocked until all in-flight bios operations are finished.
454454
*/
455455
static void btrfs_rm_dev_replace_blocked(struct btrfs_fs_info *fs_info)
456456
{

fs/btrfs/disk-io.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ static int verify_parent_transid(struct extent_io_tree *io_tree,
384384
/*
385385
* Things reading via commit roots that don't have normal protection,
386386
* like send, can have a really old block in cache that may point at a
387-
* block that has been free'd and re-allocated. So don't clear uptodate
387+
* block that has been freed and re-allocated. So don't clear uptodate
388388
* if we find an eb that is under IO (dirty/writeback) because we could
389389
* end up reading in the stale data and then writing it back out and
390390
* making everybody very sad.
@@ -418,7 +418,7 @@ static int btrfs_check_super_csum(char *raw_disk_sb)
418418
/*
419419
* The super_block structure does not span the whole
420420
* BTRFS_SUPER_INFO_SIZE range, we expect that the unused space
421-
* is filled with zeros and is included in the checkum.
421+
* is filled with zeros and is included in the checksum.
422422
*/
423423
crc = btrfs_csum_data(raw_disk_sb + BTRFS_CSUM_SIZE,
424424
crc, BTRFS_SUPER_INFO_SIZE - BTRFS_CSUM_SIZE);
@@ -600,7 +600,7 @@ static noinline int check_leaf(struct btrfs_root *root,
600600

601601
/*
602602
* Check to make sure that we don't point outside of the leaf,
603-
* just incase all the items are consistent to eachother, but
603+
* just in case all the items are consistent to each other, but
604604
* all point outside of the leaf.
605605
*/
606606
if (btrfs_item_end_nr(leaf, slot) >
@@ -3022,7 +3022,7 @@ int open_ctree(struct super_block *sb,
30223022
}
30233023

30243024
/*
3025-
* Mount does not set all options immediatelly, we can do it now and do
3025+
* Mount does not set all options immediately, we can do it now and do
30263026
* not have to wait for transaction commit
30273027
*/
30283028
btrfs_apply_pending_changes(fs_info);
@@ -3255,7 +3255,7 @@ static void btrfs_end_buffer_write_sync(struct buffer_head *bh, int uptodate)
32553255
btrfs_warn_rl_in_rcu(device->dev_root->fs_info,
32563256
"lost page write due to IO error on %s",
32573257
rcu_str_deref(device->name));
3258-
/* note, we dont' set_buffer_write_io_error because we have
3258+
/* note, we don't set_buffer_write_io_error because we have
32593259
* our own ways of dealing with the IO errors
32603260
*/
32613261
clear_buffer_uptodate(bh);
@@ -4367,7 +4367,7 @@ static int btrfs_destroy_marked_extents(struct btrfs_root *root,
43674367
if (ret)
43684368
break;
43694369

4370-
clear_extent_bits(dirty_pages, start, end, mark, GFP_NOFS);
4370+
clear_extent_bits(dirty_pages, start, end, mark);
43714371
while (start <= end) {
43724372
eb = btrfs_find_tree_block(root->fs_info, start);
43734373
start += root->nodesize;
@@ -4402,7 +4402,7 @@ static int btrfs_destroy_pinned_extent(struct btrfs_root *root,
44024402
if (ret)
44034403
break;
44044404

4405-
clear_extent_dirty(unpin, start, end, GFP_NOFS);
4405+
clear_extent_dirty(unpin, start, end);
44064406
btrfs_error_unpin_extent_range(root, start, end);
44074407
cond_resched();
44084408
}

fs/btrfs/extent-tree.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ static int add_excluded_extent(struct btrfs_root *root,
231231
{
232232
u64 end = start + num_bytes - 1;
233233
set_extent_bits(&root->fs_info->freed_extents[0],
234-
start, end, EXTENT_UPTODATE, GFP_NOFS);
234+
start, end, EXTENT_UPTODATE);
235235
set_extent_bits(&root->fs_info->freed_extents[1],
236-
start, end, EXTENT_UPTODATE, GFP_NOFS);
236+
start, end, EXTENT_UPTODATE);
237237
return 0;
238238
}
239239

@@ -246,9 +246,9 @@ static void free_excluded_extents(struct btrfs_root *root,
246246
end = start + cache->key.offset - 1;
247247

248248
clear_extent_bits(&root->fs_info->freed_extents[0],
249-
start, end, EXTENT_UPTODATE, GFP_NOFS);
249+
start, end, EXTENT_UPTODATE);
250250
clear_extent_bits(&root->fs_info->freed_extents[1],
251-
start, end, EXTENT_UPTODATE, GFP_NOFS);
251+
start, end, EXTENT_UPTODATE);
252252
}
253253

254254
static int exclude_super_stripes(struct btrfs_root *root,
@@ -980,7 +980,7 @@ int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans,
980980
* event that tree block loses its owner tree's reference and do the
981981
* back refs conversion.
982982
*
983-
* When a tree block is COW'd through a tree, there are four cases:
983+
* When a tree block is COWed through a tree, there are four cases:
984984
*
985985
* The reference count of the block is one and the tree is the block's
986986
* owner tree. Nothing to do in this case.
@@ -2595,7 +2595,7 @@ static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
25952595
}
25962596

25972597
/*
2598-
* Need to drop our head ref lock and re-aqcuire the
2598+
* Need to drop our head ref lock and re-acquire the
25992599
* delayed ref lock and then re-check to make sure
26002600
* nobody got added.
26012601
*/
@@ -2747,7 +2747,7 @@ static inline u64 heads_to_leaves(struct btrfs_root *root, u64 heads)
27472747

27482748
/*
27492749
* We don't ever fill up leaves all the way so multiply by 2 just to be
2750-
* closer to what we're really going to want to ouse.
2750+
* closer to what we're really going to want to use.
27512751
*/
27522752
return div_u64(num_bytes, BTRFS_LEAF_DATA_SIZE(root));
27532753
}
@@ -2851,7 +2851,7 @@ static void delayed_ref_async_start(struct btrfs_work *work)
28512851
}
28522852

28532853
/*
2854-
* trans->sync means that when we call end_transaciton, we won't
2854+
* trans->sync means that when we call end_transaction, we won't
28552855
* wait on delayed refs
28562856
*/
28572857
trans->sync = true;
@@ -4296,7 +4296,7 @@ void btrfs_free_reserved_data_space_noquota(struct inode *inode, u64 start,
42964296
* Called if we need to clear a data reservation for this inode
42974297
* Normally in a error case.
42984298
*
4299-
* This one will handle the per-indoe data rsv map for accurate reserved
4299+
* This one will handle the per-inode data rsv map for accurate reserved
43004300
* space framework.
43014301
*/
43024302
void btrfs_free_reserved_data_space(struct inode *inode, u64 start, u64 len)
@@ -4967,7 +4967,7 @@ void btrfs_init_async_reclaim_work(struct work_struct *work)
49674967
* @orig_bytes - the number of bytes we want
49684968
* @flush - whether or not we can flush to make our reservation
49694969
*
4970-
* This will reserve orgi_bytes number of bytes from the space info associated
4970+
* This will reserve orig_bytes number of bytes from the space info associated
49714971
* with the block_rsv. If there is not enough space it will make an attempt to
49724972
* flush out space to make room. It will do this by flushing delalloc if
49734973
* possible or committing the transaction. If flush is 0 then no attempts to
@@ -5572,7 +5572,7 @@ void btrfs_orphan_release_metadata(struct inode *inode)
55725572
* common file/directory operations, they change two fs/file trees
55735573
* and root tree, the number of items that the qgroup reserves is
55745574
* different with the free space reservation. So we can not use
5575-
* the space reseravtion mechanism in start_transaction().
5575+
* the space reservation mechanism in start_transaction().
55765576
*/
55775577
int btrfs_subvolume_reserve_metadata(struct btrfs_root *root,
55785578
struct btrfs_block_rsv *rsv,
@@ -5621,7 +5621,7 @@ void btrfs_subvolume_release_metadata(struct btrfs_root *root,
56215621
/**
56225622
* drop_outstanding_extent - drop an outstanding extent
56235623
* @inode: the inode we're dropping the extent for
5624-
* @num_bytes: the number of bytes we're relaseing.
5624+
* @num_bytes: the number of bytes we're releasing.
56255625
*
56265626
* This is called when we are freeing up an outstanding extent, either called
56275627
* after an error or after an extent is written. This will return the number of
@@ -5647,7 +5647,7 @@ static unsigned drop_outstanding_extent(struct inode *inode, u64 num_bytes)
56475647
drop_inode_space = 1;
56485648

56495649
/*
5650-
* If we have more or the same amount of outsanding extents than we have
5650+
* If we have more or the same amount of outstanding extents than we have
56515651
* reserved then we need to leave the reserved extents count alone.
56525652
*/
56535653
if (BTRFS_I(inode)->outstanding_extents >=
@@ -5661,8 +5661,8 @@ static unsigned drop_outstanding_extent(struct inode *inode, u64 num_bytes)
56615661
}
56625662

56635663
/**
5664-
* calc_csum_metadata_size - return the amount of metada space that must be
5665-
* reserved/free'd for the given bytes.
5664+
* calc_csum_metadata_size - return the amount of metadata space that must be
5665+
* reserved/freed for the given bytes.
56665666
* @inode: the inode we're manipulating
56675667
* @num_bytes: the number of bytes in question
56685668
* @reserve: 1 if we are reserving space, 0 if we are freeing space
@@ -5814,7 +5814,7 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes)
58145814

58155815
/*
58165816
* This is tricky, but first we need to figure out how much we
5817-
* free'd from any free-ers that occurred during this
5817+
* freed from any free-ers that occurred during this
58185818
* reservation, so we reset ->csum_bytes to the csum_bytes
58195819
* before we dropped our lock, and then call the free for the
58205820
* number of bytes that were freed while we were trying our
@@ -5836,7 +5836,7 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes)
58365836

58375837
/*
58385838
* Now reset ->csum_bytes to what it should be. If bytes is
5839-
* more than to_free then we would have free'd more space had we
5839+
* more than to_free then we would have freed more space had we
58405840
* not had an artificially high ->csum_bytes, so we need to free
58415841
* the remainder. If bytes is the same or less then we don't
58425842
* need to do anything, the other free-ers did the correct
@@ -6515,7 +6515,7 @@ int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans,
65156515
ret = btrfs_discard_extent(root, start,
65166516
end + 1 - start, NULL);
65176517

6518-
clear_extent_dirty(unpin, start, end, GFP_NOFS);
6518+
clear_extent_dirty(unpin, start, end);
65196519
unpin_extent_range(root, start, end, true);
65206520
mutex_unlock(&fs_info->unused_bg_unpin_mutex);
65216521
cond_resched();
@@ -7578,7 +7578,7 @@ static noinline int find_free_extent(struct btrfs_root *orig_root,
75787578
if (loop == LOOP_CACHING_NOWAIT) {
75797579
/*
75807580
* We want to skip the LOOP_CACHING_WAIT step if we
7581-
* don't have any unached bgs and we've alrelady done a
7581+
* don't have any uncached bgs and we've already done a
75827582
* full search through.
75837583
*/
75847584
if (orig_have_caching_bg || !full_search)
@@ -7982,7 +7982,7 @@ int btrfs_alloc_logged_file_extent(struct btrfs_trans_handle *trans,
79827982

79837983
/*
79847984
* Mixed block groups will exclude before processing the log so we only
7985-
* need to do the exlude dance if this fs isn't mixed.
7985+
* need to do the exclude dance if this fs isn't mixed.
79867986
*/
79877987
if (!btrfs_fs_incompat(root->fs_info, MIXED_GROUPS)) {
79887988
ret = __exclude_logged_extent(root, ins->objectid, ins->offset);
@@ -8032,7 +8032,7 @@ btrfs_init_new_buffer(struct btrfs_trans_handle *trans, struct btrfs_root *root,
80328032
buf->start + buf->len - 1, GFP_NOFS);
80338033
else
80348034
set_extent_new(&root->dirty_log_pages, buf->start,
8035-
buf->start + buf->len - 1, GFP_NOFS);
8035+
buf->start + buf->len - 1);
80368036
} else {
80378037
buf->log_index = -1;
80388038
set_extent_dirty(&trans->transaction->dirty_pages, buf->start,
@@ -9426,7 +9426,7 @@ u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo)
94269426
u64 free_bytes = 0;
94279427
int factor;
94289428

9429-
/* It's df, we don't care if it's racey */
9429+
/* It's df, we don't care if it's racy */
94309430
if (list_empty(&sinfo->ro_bgs))
94319431
return 0;
94329432

@@ -10635,14 +10635,14 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info)
1063510635
*/
1063610636
mutex_lock(&fs_info->unused_bg_unpin_mutex);
1063710637
ret = clear_extent_bits(&fs_info->freed_extents[0], start, end,
10638-
EXTENT_DIRTY, GFP_NOFS);
10638+
EXTENT_DIRTY);
1063910639
if (ret) {
1064010640
mutex_unlock(&fs_info->unused_bg_unpin_mutex);
1064110641
btrfs_dec_block_group_ro(root, block_group);
1064210642
goto end_trans;
1064310643
}
1064410644
ret = clear_extent_bits(&fs_info->freed_extents[1], start, end,
10645-
EXTENT_DIRTY, GFP_NOFS);
10645+
EXTENT_DIRTY);
1064610646
if (ret) {
1064710647
mutex_unlock(&fs_info->unused_bg_unpin_mutex);
1064810648
btrfs_dec_block_group_ro(root, block_group);

0 commit comments

Comments
 (0)