Commit ee93961b authored by Jeff Mahoney's avatar Jeff Mahoney Committed by Linus Torvalds

reiserfs: rename [cn]_* variables

This patch renames n_, c_, etc variables to something more sane.  This
is the sixth in a series of patches to rip out some of the awful
variable naming in reiserfs.
Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d68caa95
...@@ -138,11 +138,11 @@ static int reiserfs_sync_file(struct file *filp, ...@@ -138,11 +138,11 @@ static int reiserfs_sync_file(struct file *filp,
struct dentry *dentry, int datasync) struct dentry *dentry, int datasync)
{ {
struct inode *inode = dentry->d_inode; struct inode *inode = dentry->d_inode;
int n_err; int err;
int barrier_done; int barrier_done;
BUG_ON(!S_ISREG(inode->i_mode)); BUG_ON(!S_ISREG(inode->i_mode));
n_err = sync_mapping_buffers(inode->i_mapping); err = sync_mapping_buffers(inode->i_mapping);
reiserfs_write_lock(inode->i_sb); reiserfs_write_lock(inode->i_sb);
barrier_done = reiserfs_commit_for_inode(inode); barrier_done = reiserfs_commit_for_inode(inode);
reiserfs_write_unlock(inode->i_sb); reiserfs_write_unlock(inode->i_sb);
...@@ -150,7 +150,7 @@ static int reiserfs_sync_file(struct file *filp, ...@@ -150,7 +150,7 @@ static int reiserfs_sync_file(struct file *filp,
blkdev_issue_flush(inode->i_sb->s_bdev, NULL); blkdev_issue_flush(inode->i_sb->s_bdev, NULL);
if (barrier_done < 0) if (barrier_done < 0)
return barrier_done; return barrier_done;
return (n_err < 0) ? -EIO : 0; return (err < 0) ? -EIO : 0;
} }
/* taken fs/buffer.c:__block_commit_write */ /* taken fs/buffer.c:__block_commit_write */
......
This diff is collapsed.
This diff is collapsed.
...@@ -26,7 +26,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, ...@@ -26,7 +26,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode,
converted item. */ converted item. */
struct item_head ind_ih; /* new indirect item to be inserted or struct item_head ind_ih; /* new indirect item to be inserted or
key of unfm pointer to be pasted */ key of unfm pointer to be pasted */
int n_blk_size, n_retval; /* returned value for reiserfs_insert_item and clones */ int blk_size, retval; /* returned value for reiserfs_insert_item and clones */
unp_t unfm_ptr; /* Handle on an unformatted node unp_t unfm_ptr; /* Handle on an unformatted node
that will be inserted in the that will be inserted in the
tree. */ tree. */
...@@ -35,7 +35,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, ...@@ -35,7 +35,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode,
REISERFS_SB(sb)->s_direct2indirect++; REISERFS_SB(sb)->s_direct2indirect++;
n_blk_size = sb->s_blocksize; blk_size = sb->s_blocksize;
/* and key to search for append or insert pointer to the new /* and key to search for append or insert pointer to the new
unformatted node. */ unformatted node. */
...@@ -64,17 +64,17 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, ...@@ -64,17 +64,17 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode,
set_ih_free_space(&ind_ih, 0); /* delete at nearest future */ set_ih_free_space(&ind_ih, 0); /* delete at nearest future */
put_ih_item_len(&ind_ih, UNFM_P_SIZE); put_ih_item_len(&ind_ih, UNFM_P_SIZE);
PATH_LAST_POSITION(path)++; PATH_LAST_POSITION(path)++;
n_retval = retval =
reiserfs_insert_item(th, path, &end_key, &ind_ih, inode, reiserfs_insert_item(th, path, &end_key, &ind_ih, inode,
(char *)&unfm_ptr); (char *)&unfm_ptr);
} else { } else {
/* Paste into last indirect item of an object. */ /* Paste into last indirect item of an object. */
n_retval = reiserfs_paste_into_item(th, path, &end_key, inode, retval = reiserfs_paste_into_item(th, path, &end_key, inode,
(char *)&unfm_ptr, (char *)&unfm_ptr,
UNFM_P_SIZE); UNFM_P_SIZE);
} }
if (n_retval) { if (retval) {
return n_retval; return retval;
} }
// note: from here there are two keys which have matching first // note: from here there are two keys which have matching first
// three key components. They only differ by the fourth one. // three key components. They only differ by the fourth one.
...@@ -98,7 +98,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, ...@@ -98,7 +98,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode,
RFALSE(!is_direct_le_ih(p_le_ih), RFALSE(!is_direct_le_ih(p_le_ih),
"vs-14055: direct item expected(%K), found %h", "vs-14055: direct item expected(%K), found %h",
&end_key, p_le_ih); &end_key, p_le_ih);
tail_size = (le_ih_k_offset(p_le_ih) & (n_blk_size - 1)) tail_size = (le_ih_k_offset(p_le_ih) & (blk_size - 1))
+ ih_item_len(p_le_ih) - 1; + ih_item_len(p_le_ih) - 1;
/* we only send the unbh pointer if the buffer is not up to date. /* we only send the unbh pointer if the buffer is not up to date.
...@@ -113,11 +113,11 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, ...@@ -113,11 +113,11 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode,
} else { } else {
up_to_date_bh = unbh; up_to_date_bh = unbh;
} }
n_retval = reiserfs_delete_item(th, path, &end_key, inode, retval = reiserfs_delete_item(th, path, &end_key, inode,
up_to_date_bh); up_to_date_bh);
total_tail += n_retval; total_tail += retval;
if (tail_size == n_retval) if (tail_size == retval)
// done: file does not have direct items anymore // done: file does not have direct items anymore
break; break;
...@@ -129,7 +129,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, ...@@ -129,7 +129,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode,
unsigned pgoff = unsigned pgoff =
(tail_offset + total_tail - 1) & (PAGE_CACHE_SIZE - 1); (tail_offset + total_tail - 1) & (PAGE_CACHE_SIZE - 1);
char *kaddr = kmap_atomic(up_to_date_bh->b_page, KM_USER0); char *kaddr = kmap_atomic(up_to_date_bh->b_page, KM_USER0);
memset(kaddr + pgoff, 0, n_blk_size - total_tail); memset(kaddr + pgoff, 0, blk_size - total_tail);
kunmap_atomic(kaddr, KM_USER0); kunmap_atomic(kaddr, KM_USER0);
} }
...@@ -181,7 +181,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th, ...@@ -181,7 +181,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th,
{ {
struct super_block *sb = inode->i_sb; struct super_block *sb = inode->i_sb;
struct item_head s_ih; struct item_head s_ih;
unsigned long n_block_size = sb->s_blocksize; unsigned long block_size = sb->s_blocksize;
char *tail; char *tail;
int tail_len, round_tail_len; int tail_len, round_tail_len;
loff_t pos, pos1; /* position of first byte of the tail */ loff_t pos, pos1; /* position of first byte of the tail */
...@@ -196,7 +196,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th, ...@@ -196,7 +196,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th,
/* store item head path points to. */ /* store item head path points to. */
copy_item_head(&s_ih, PATH_PITEM_HEAD(path)); copy_item_head(&s_ih, PATH_PITEM_HEAD(path));
tail_len = (n_new_file_size & (n_block_size - 1)); tail_len = (n_new_file_size & (block_size - 1));
if (get_inode_sd_version(inode) == STAT_DATA_V2) if (get_inode_sd_version(inode) == STAT_DATA_V2)
round_tail_len = ROUND_UP(tail_len); round_tail_len = ROUND_UP(tail_len);
else else
...@@ -257,7 +257,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th, ...@@ -257,7 +257,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th,
unformatted node. For now i_size is considered as guard for unformatted node. For now i_size is considered as guard for
going out of file size */ going out of file size */
kunmap(page); kunmap(page);
return n_block_size - round_tail_len; return block_size - round_tail_len;
} }
kunmap(page); kunmap(page);
...@@ -276,5 +276,5 @@ int indirect2direct(struct reiserfs_transaction_handle *th, ...@@ -276,5 +276,5 @@ int indirect2direct(struct reiserfs_transaction_handle *th,
/* mark_file_with_tail (inode, pos1 + 1); */ /* mark_file_with_tail (inode, pos1 + 1); */
REISERFS_I(inode)->i_first_direct_byte = pos1 + 1; REISERFS_I(inode)->i_first_direct_byte = pos1 + 1;
return n_block_size - round_tail_len; return block_size - round_tail_len;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment