diff options
author | Jeff Mahoney <jeffm@suse.com> | 2009-03-30 14:02:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 15:16:39 -0400 |
commit | a9dd364358fbdc68faee5d20c2d648c320dc3cf0 (patch) | |
tree | effcf61e5e198083faff82dc1e0bd6071639fca8 /fs/reiserfs/fix_node.c | |
parent | 0222e6571c332563a48d4cf5487b67feabe60b5e (diff) |
reiserfs: rename p_s_sb to sb
This patch is a simple s/p_s_sb/sb/g to the reiserfs code. This is the
first in a series of patches to rip out some of the awful variable
naming in reiserfs.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/reiserfs/fix_node.c')
-rw-r--r-- | fs/reiserfs/fix_node.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c index a3be7da3e2b9..799c0ce24291 100644 --- a/fs/reiserfs/fix_node.c +++ b/fs/reiserfs/fix_node.c | |||
@@ -785,7 +785,7 @@ static int get_empty_nodes(struct tree_balance *p_s_tb, int n_h) | |||
785 | b_blocknr_t *p_n_blocknr, a_n_blocknrs[MAX_AMOUNT_NEEDED] = { 0, }; | 785 | b_blocknr_t *p_n_blocknr, a_n_blocknrs[MAX_AMOUNT_NEEDED] = { 0, }; |
786 | int n_counter, n_number_of_freeblk, n_amount_needed, /* number of needed empty blocks */ | 786 | int n_counter, n_number_of_freeblk, n_amount_needed, /* number of needed empty blocks */ |
787 | n_retval = CARRY_ON; | 787 | n_retval = CARRY_ON; |
788 | struct super_block *p_s_sb = p_s_tb->tb_sb; | 788 | struct super_block *sb = p_s_tb->tb_sb; |
789 | 789 | ||
790 | /* number_of_freeblk is the number of empty blocks which have been | 790 | /* number_of_freeblk is the number of empty blocks which have been |
791 | acquired for use by the balancing algorithm minus the number of | 791 | acquired for use by the balancing algorithm minus the number of |
@@ -830,7 +830,7 @@ static int get_empty_nodes(struct tree_balance *p_s_tb, int n_h) | |||
830 | RFALSE(!*p_n_blocknr, | 830 | RFALSE(!*p_n_blocknr, |
831 | "PAP-8135: reiserfs_new_blocknrs failed when got new blocks"); | 831 | "PAP-8135: reiserfs_new_blocknrs failed when got new blocks"); |
832 | 832 | ||
833 | p_s_new_bh = sb_getblk(p_s_sb, *p_n_blocknr); | 833 | p_s_new_bh = sb_getblk(sb, *p_n_blocknr); |
834 | RFALSE(buffer_dirty(p_s_new_bh) || | 834 | RFALSE(buffer_dirty(p_s_new_bh) || |
835 | buffer_journaled(p_s_new_bh) || | 835 | buffer_journaled(p_s_new_bh) || |
836 | buffer_journal_dirty(p_s_new_bh), | 836 | buffer_journal_dirty(p_s_new_bh), |
@@ -899,7 +899,7 @@ static int get_rfree(struct tree_balance *tb, int h) | |||
899 | static int is_left_neighbor_in_cache(struct tree_balance *p_s_tb, int n_h) | 899 | static int is_left_neighbor_in_cache(struct tree_balance *p_s_tb, int n_h) |
900 | { | 900 | { |
901 | struct buffer_head *p_s_father, *left; | 901 | struct buffer_head *p_s_father, *left; |
902 | struct super_block *p_s_sb = p_s_tb->tb_sb; | 902 | struct super_block *sb = p_s_tb->tb_sb; |
903 | b_blocknr_t n_left_neighbor_blocknr; | 903 | b_blocknr_t n_left_neighbor_blocknr; |
904 | int n_left_neighbor_position; | 904 | int n_left_neighbor_position; |
905 | 905 | ||
@@ -924,7 +924,7 @@ static int is_left_neighbor_in_cache(struct tree_balance *p_s_tb, int n_h) | |||
924 | n_left_neighbor_blocknr = | 924 | n_left_neighbor_blocknr = |
925 | B_N_CHILD_NUM(p_s_tb->FL[n_h], n_left_neighbor_position); | 925 | B_N_CHILD_NUM(p_s_tb->FL[n_h], n_left_neighbor_position); |
926 | /* Look for the left neighbor in the cache. */ | 926 | /* Look for the left neighbor in the cache. */ |
927 | if ((left = sb_find_get_block(p_s_sb, n_left_neighbor_blocknr))) { | 927 | if ((left = sb_find_get_block(sb, n_left_neighbor_blocknr))) { |
928 | 928 | ||
929 | RFALSE(buffer_uptodate(left) && !B_IS_IN_TREE(left), | 929 | RFALSE(buffer_uptodate(left) && !B_IS_IN_TREE(left), |
930 | "vs-8170: left neighbor (%b %z) is not in the tree", | 930 | "vs-8170: left neighbor (%b %z) is not in the tree", |
@@ -1942,14 +1942,14 @@ static int get_neighbors(struct tree_balance *p_s_tb, int n_h) | |||
1942 | int n_child_position, | 1942 | int n_child_position, |
1943 | n_path_offset = PATH_H_PATH_OFFSET(p_s_tb->tb_path, n_h + 1); | 1943 | n_path_offset = PATH_H_PATH_OFFSET(p_s_tb->tb_path, n_h + 1); |
1944 | unsigned long n_son_number; | 1944 | unsigned long n_son_number; |
1945 | struct super_block *p_s_sb = p_s_tb->tb_sb; | 1945 | struct super_block *sb = p_s_tb->tb_sb; |
1946 | struct buffer_head *p_s_bh; | 1946 | struct buffer_head *p_s_bh; |
1947 | 1947 | ||
1948 | PROC_INFO_INC(p_s_sb, get_neighbors[n_h]); | 1948 | PROC_INFO_INC(sb, get_neighbors[n_h]); |
1949 | 1949 | ||
1950 | if (p_s_tb->lnum[n_h]) { | 1950 | if (p_s_tb->lnum[n_h]) { |
1951 | /* We need left neighbor to balance S[n_h]. */ | 1951 | /* We need left neighbor to balance S[n_h]. */ |
1952 | PROC_INFO_INC(p_s_sb, need_l_neighbor[n_h]); | 1952 | PROC_INFO_INC(sb, need_l_neighbor[n_h]); |
1953 | p_s_bh = PATH_OFFSET_PBUFFER(p_s_tb->tb_path, n_path_offset); | 1953 | p_s_bh = PATH_OFFSET_PBUFFER(p_s_tb->tb_path, n_path_offset); |
1954 | 1954 | ||
1955 | RFALSE(p_s_bh == p_s_tb->FL[n_h] && | 1955 | RFALSE(p_s_bh == p_s_tb->FL[n_h] && |
@@ -1961,12 +1961,12 @@ static int get_neighbors(struct tree_balance *p_s_tb, int n_h) | |||
1961 | p_s_tb->FL[n_h]) ? p_s_tb->lkey[n_h] : B_NR_ITEMS(p_s_tb-> | 1961 | p_s_tb->FL[n_h]) ? p_s_tb->lkey[n_h] : B_NR_ITEMS(p_s_tb-> |
1962 | FL[n_h]); | 1962 | FL[n_h]); |
1963 | n_son_number = B_N_CHILD_NUM(p_s_tb->FL[n_h], n_child_position); | 1963 | n_son_number = B_N_CHILD_NUM(p_s_tb->FL[n_h], n_child_position); |
1964 | p_s_bh = sb_bread(p_s_sb, n_son_number); | 1964 | p_s_bh = sb_bread(sb, n_son_number); |
1965 | if (!p_s_bh) | 1965 | if (!p_s_bh) |
1966 | return IO_ERROR; | 1966 | return IO_ERROR; |
1967 | if (FILESYSTEM_CHANGED_TB(p_s_tb)) { | 1967 | if (FILESYSTEM_CHANGED_TB(p_s_tb)) { |
1968 | brelse(p_s_bh); | 1968 | brelse(p_s_bh); |
1969 | PROC_INFO_INC(p_s_sb, get_neighbors_restart[n_h]); | 1969 | PROC_INFO_INC(sb, get_neighbors_restart[n_h]); |
1970 | return REPEAT_SEARCH; | 1970 | return REPEAT_SEARCH; |
1971 | } | 1971 | } |
1972 | 1972 | ||
@@ -1986,7 +1986,7 @@ static int get_neighbors(struct tree_balance *p_s_tb, int n_h) | |||
1986 | } | 1986 | } |
1987 | 1987 | ||
1988 | if (p_s_tb->rnum[n_h]) { /* We need right neighbor to balance S[n_path_offset]. */ | 1988 | if (p_s_tb->rnum[n_h]) { /* We need right neighbor to balance S[n_path_offset]. */ |
1989 | PROC_INFO_INC(p_s_sb, need_r_neighbor[n_h]); | 1989 | PROC_INFO_INC(sb, need_r_neighbor[n_h]); |
1990 | p_s_bh = PATH_OFFSET_PBUFFER(p_s_tb->tb_path, n_path_offset); | 1990 | p_s_bh = PATH_OFFSET_PBUFFER(p_s_tb->tb_path, n_path_offset); |
1991 | 1991 | ||
1992 | RFALSE(p_s_bh == p_s_tb->FR[n_h] && | 1992 | RFALSE(p_s_bh == p_s_tb->FR[n_h] && |
@@ -1998,12 +1998,12 @@ static int get_neighbors(struct tree_balance *p_s_tb, int n_h) | |||
1998 | n_child_position = | 1998 | n_child_position = |
1999 | (p_s_bh == p_s_tb->FR[n_h]) ? p_s_tb->rkey[n_h] + 1 : 0; | 1999 | (p_s_bh == p_s_tb->FR[n_h]) ? p_s_tb->rkey[n_h] + 1 : 0; |
2000 | n_son_number = B_N_CHILD_NUM(p_s_tb->FR[n_h], n_child_position); | 2000 | n_son_number = B_N_CHILD_NUM(p_s_tb->FR[n_h], n_child_position); |
2001 | p_s_bh = sb_bread(p_s_sb, n_son_number); | 2001 | p_s_bh = sb_bread(sb, n_son_number); |
2002 | if (!p_s_bh) | 2002 | if (!p_s_bh) |
2003 | return IO_ERROR; | 2003 | return IO_ERROR; |
2004 | if (FILESYSTEM_CHANGED_TB(p_s_tb)) { | 2004 | if (FILESYSTEM_CHANGED_TB(p_s_tb)) { |
2005 | brelse(p_s_bh); | 2005 | brelse(p_s_bh); |
2006 | PROC_INFO_INC(p_s_sb, get_neighbors_restart[n_h]); | 2006 | PROC_INFO_INC(sb, get_neighbors_restart[n_h]); |
2007 | return REPEAT_SEARCH; | 2007 | return REPEAT_SEARCH; |
2008 | } | 2008 | } |
2009 | brelse(p_s_tb->R[n_h]); | 2009 | brelse(p_s_tb->R[n_h]); |
@@ -2089,51 +2089,51 @@ static int get_mem_for_virtual_node(struct tree_balance *tb) | |||
2089 | } | 2089 | } |
2090 | 2090 | ||
2091 | #ifdef CONFIG_REISERFS_CHECK | 2091 | #ifdef CONFIG_REISERFS_CHECK |
2092 | static void tb_buffer_sanity_check(struct super_block *p_s_sb, | 2092 | static void tb_buffer_sanity_check(struct super_block *sb, |
2093 | struct buffer_head *p_s_bh, | 2093 | struct buffer_head *p_s_bh, |
2094 | const char *descr, int level) | 2094 | const char *descr, int level) |
2095 | { | 2095 | { |
2096 | if (p_s_bh) { | 2096 | if (p_s_bh) { |
2097 | if (atomic_read(&(p_s_bh->b_count)) <= 0) { | 2097 | if (atomic_read(&(p_s_bh->b_count)) <= 0) { |
2098 | 2098 | ||
2099 | reiserfs_panic(p_s_sb, "jmacd-1", "negative or zero " | 2099 | reiserfs_panic(sb, "jmacd-1", "negative or zero " |
2100 | "reference counter for buffer %s[%d] " | 2100 | "reference counter for buffer %s[%d] " |
2101 | "(%b)", descr, level, p_s_bh); | 2101 | "(%b)", descr, level, p_s_bh); |
2102 | } | 2102 | } |
2103 | 2103 | ||
2104 | if (!buffer_uptodate(p_s_bh)) { | 2104 | if (!buffer_uptodate(p_s_bh)) { |
2105 | reiserfs_panic(p_s_sb, "jmacd-2", "buffer is not up " | 2105 | reiserfs_panic(sb, "jmacd-2", "buffer is not up " |
2106 | "to date %s[%d] (%b)", | 2106 | "to date %s[%d] (%b)", |
2107 | descr, level, p_s_bh); | 2107 | descr, level, p_s_bh); |
2108 | } | 2108 | } |
2109 | 2109 | ||
2110 | if (!B_IS_IN_TREE(p_s_bh)) { | 2110 | if (!B_IS_IN_TREE(p_s_bh)) { |
2111 | reiserfs_panic(p_s_sb, "jmacd-3", "buffer is not " | 2111 | reiserfs_panic(sb, "jmacd-3", "buffer is not " |
2112 | "in tree %s[%d] (%b)", | 2112 | "in tree %s[%d] (%b)", |
2113 | descr, level, p_s_bh); | 2113 | descr, level, p_s_bh); |
2114 | } | 2114 | } |
2115 | 2115 | ||
2116 | if (p_s_bh->b_bdev != p_s_sb->s_bdev) { | 2116 | if (p_s_bh->b_bdev != sb->s_bdev) { |
2117 | reiserfs_panic(p_s_sb, "jmacd-4", "buffer has wrong " | 2117 | reiserfs_panic(sb, "jmacd-4", "buffer has wrong " |
2118 | "device %s[%d] (%b)", | 2118 | "device %s[%d] (%b)", |
2119 | descr, level, p_s_bh); | 2119 | descr, level, p_s_bh); |
2120 | } | 2120 | } |
2121 | 2121 | ||
2122 | if (p_s_bh->b_size != p_s_sb->s_blocksize) { | 2122 | if (p_s_bh->b_size != sb->s_blocksize) { |
2123 | reiserfs_panic(p_s_sb, "jmacd-5", "buffer has wrong " | 2123 | reiserfs_panic(sb, "jmacd-5", "buffer has wrong " |
2124 | "blocksize %s[%d] (%b)", | 2124 | "blocksize %s[%d] (%b)", |
2125 | descr, level, p_s_bh); | 2125 | descr, level, p_s_bh); |
2126 | } | 2126 | } |
2127 | 2127 | ||
2128 | if (p_s_bh->b_blocknr > SB_BLOCK_COUNT(p_s_sb)) { | 2128 | if (p_s_bh->b_blocknr > SB_BLOCK_COUNT(sb)) { |
2129 | reiserfs_panic(p_s_sb, "jmacd-6", "buffer block " | 2129 | reiserfs_panic(sb, "jmacd-6", "buffer block " |
2130 | "number too high %s[%d] (%b)", | 2130 | "number too high %s[%d] (%b)", |
2131 | descr, level, p_s_bh); | 2131 | descr, level, p_s_bh); |
2132 | } | 2132 | } |
2133 | } | 2133 | } |
2134 | } | 2134 | } |
2135 | #else | 2135 | #else |
2136 | static void tb_buffer_sanity_check(struct super_block *p_s_sb, | 2136 | static void tb_buffer_sanity_check(struct super_block *sb, |
2137 | struct buffer_head *p_s_bh, | 2137 | struct buffer_head *p_s_bh, |
2138 | const char *descr, int level) | 2138 | const char *descr, int level) |
2139 | {; | 2139 | {; |