diff options
author | Jeff Mahoney <jeffm@suse.com> | 2014-04-23 10:00:35 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2014-05-06 22:51:44 +0200 |
commit | 4cf5f7addf18ecae2ea49b11944976cbd26d5281 (patch) | |
tree | 52aa9ebf68e7951bacbdc708f1d19467736187bc /fs/reiserfs/tail_conversion.c | |
parent | 797d9016ceca69879bb273218810fa0beef46aac (diff) | |
download | op-kernel-dev-4cf5f7addf18ecae2ea49b11944976cbd26d5281.zip op-kernel-dev-4cf5f7addf18ecae2ea49b11944976cbd26d5281.tar.gz |
reiserfs: cleanup, rename key and item accessors to more friendly names
This patch does a quick search and replace:
B_N_PITEM_HEAD() -> item_head()
B_N_PDELIM_KEY() -> internal_key()
B_N_PKEY() -> leaf_key()
B_N_PITEM() -> item_body()
And the item_head version:
B_I_PITEM() -> ih_item_body()
I_ENTRY_COUNT() -> ih_entry_count()
And the treepath variants:
get_ih() -> tp_item_head()
PATH_PITEM_HEAD() -> tp_item_head()
get_item() -> tp_item_body()
... which makes the code much easier on the eyes.
I've also removed a few unused macros.
Checkpatch will complain about the 80 character limit for do_balan.c.
I've addressed that in a later patchset to split up balance_leaf().
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/reiserfs/tail_conversion.c')
-rw-r--r-- | fs/reiserfs/tail_conversion.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/reiserfs/tail_conversion.c b/fs/reiserfs/tail_conversion.c index 5e2624d..fc1981d 100644 --- a/fs/reiserfs/tail_conversion.c +++ b/fs/reiserfs/tail_conversion.c @@ -20,7 +20,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, { struct super_block *sb = inode->i_sb; struct buffer_head *up_to_date_bh; - struct item_head *p_le_ih = PATH_PITEM_HEAD(path); + struct item_head *p_le_ih = tp_item_head(path); unsigned long total_tail = 0; struct cpu_key end_key; /* Key to search for the last byte of the converted item. */ @@ -55,7 +55,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, return -EIO; } - p_le_ih = PATH_PITEM_HEAD(path); + p_le_ih = tp_item_head(path); unfm_ptr = cpu_to_le32(unbh->b_blocknr); @@ -94,7 +94,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, POSITION_FOUND) reiserfs_panic(sb, "PAP-14050", "direct item (%K) not found", &end_key); - p_le_ih = PATH_PITEM_HEAD(path); + p_le_ih = tp_item_head(path); RFALSE(!is_direct_le_ih(p_le_ih), "vs-14055: direct item expected(%K), found %h", &end_key, p_le_ih); @@ -194,7 +194,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th, *mode = M_SKIP_BALANCING; /* store item head path points to. */ - copy_item_head(&s_ih, PATH_PITEM_HEAD(path)); + copy_item_head(&s_ih, tp_item_head(path)); tail_len = (n_new_file_size & (block_size - 1)); if (get_inode_sd_version(inode) == STAT_DATA_V2) @@ -220,7 +220,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th, reiserfs_panic(sb, "PAP-5520", "item to be converted %K does not exist", item_key); - copy_item_head(&s_ih, PATH_PITEM_HEAD(path)); + copy_item_head(&s_ih, tp_item_head(path)); #ifdef CONFIG_REISERFS_CHECK pos = le_ih_k_offset(&s_ih) - 1 + (ih_item_len(&s_ih) / UNFM_P_SIZE - |