aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/lpt_commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/lpt_commit.c')
-rw-r--r--fs/ubifs/lpt_commit.c36
1 files changed, 15 insertions, 21 deletions
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
index 74082553e1fc..a1de3cf9dba2 100644
--- a/fs/ubifs/lpt_commit.c
+++ b/fs/ubifs/lpt_commit.c
@@ -1886,8 +1886,7 @@ static void dump_lpt_leb(const struct ubifs_info *c, int lnum)
1886 int err, len = c->leb_size, node_type, node_num, node_len, offs; 1886 int err, len = c->leb_size, node_type, node_num, node_len, offs;
1887 void *buf, *p; 1887 void *buf, *p;
1888 1888
1889 printk(KERN_DEBUG "(pid %d) start dumping LEB %d\n", 1889 pr_err("(pid %d) start dumping LEB %d\n", current->pid, lnum);
1890 current->pid, lnum);
1891 buf = p = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL); 1890 buf = p = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);
1892 if (!buf) { 1891 if (!buf) {
1893 ubifs_err("cannot allocate memory to dump LPT"); 1892 ubifs_err("cannot allocate memory to dump LPT");
@@ -1905,14 +1904,14 @@ static void dump_lpt_leb(const struct ubifs_info *c, int lnum)
1905 1904
1906 pad_len = get_pad_len(c, p, len); 1905 pad_len = get_pad_len(c, p, len);
1907 if (pad_len) { 1906 if (pad_len) {
1908 printk(KERN_DEBUG "LEB %d:%d, pad %d bytes\n", 1907 pr_err("LEB %d:%d, pad %d bytes\n",
1909 lnum, offs, pad_len); 1908 lnum, offs, pad_len);
1910 p += pad_len; 1909 p += pad_len;
1911 len -= pad_len; 1910 len -= pad_len;
1912 continue; 1911 continue;
1913 } 1912 }
1914 if (len) 1913 if (len)
1915 printk(KERN_DEBUG "LEB %d:%d, free %d bytes\n", 1914 pr_err("LEB %d:%d, free %d bytes\n",
1916 lnum, offs, len); 1915 lnum, offs, len);
1917 break; 1916 break;
1918 } 1917 }
@@ -1923,11 +1922,10 @@ static void dump_lpt_leb(const struct ubifs_info *c, int lnum)
1923 { 1922 {
1924 node_len = c->pnode_sz; 1923 node_len = c->pnode_sz;
1925 if (c->big_lpt) 1924 if (c->big_lpt)
1926 printk(KERN_DEBUG "LEB %d:%d, pnode num %d\n", 1925 pr_err("LEB %d:%d, pnode num %d\n",
1927 lnum, offs, node_num); 1926 lnum, offs, node_num);
1928 else 1927 else
1929 printk(KERN_DEBUG "LEB %d:%d, pnode\n", 1928 pr_err("LEB %d:%d, pnode\n", lnum, offs);
1930 lnum, offs);
1931 break; 1929 break;
1932 } 1930 }
1933 case UBIFS_LPT_NNODE: 1931 case UBIFS_LPT_NNODE:
@@ -1937,29 +1935,28 @@ static void dump_lpt_leb(const struct ubifs_info *c, int lnum)
1937 1935
1938 node_len = c->nnode_sz; 1936 node_len = c->nnode_sz;
1939 if (c->big_lpt) 1937 if (c->big_lpt)
1940 printk(KERN_DEBUG "LEB %d:%d, nnode num %d, ", 1938 pr_err("LEB %d:%d, nnode num %d, ",
1941 lnum, offs, node_num); 1939 lnum, offs, node_num);
1942 else 1940 else
1943 printk(KERN_DEBUG "LEB %d:%d, nnode, ", 1941 pr_err("LEB %d:%d, nnode, ",
1944 lnum, offs); 1942 lnum, offs);
1945 err = ubifs_unpack_nnode(c, p, &nnode); 1943 err = ubifs_unpack_nnode(c, p, &nnode);
1946 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { 1944 for (i = 0; i < UBIFS_LPT_FANOUT; i++) {
1947 printk(KERN_CONT "%d:%d", nnode.nbranch[i].lnum, 1945 pr_cont("%d:%d", nnode.nbranch[i].lnum,
1948 nnode.nbranch[i].offs); 1946 nnode.nbranch[i].offs);
1949 if (i != UBIFS_LPT_FANOUT - 1) 1947 if (i != UBIFS_LPT_FANOUT - 1)
1950 printk(KERN_CONT ", "); 1948 pr_cont(", ");
1951 } 1949 }
1952 printk(KERN_CONT "\n"); 1950 pr_cont("\n");
1953 break; 1951 break;
1954 } 1952 }
1955 case UBIFS_LPT_LTAB: 1953 case UBIFS_LPT_LTAB:
1956 node_len = c->ltab_sz; 1954 node_len = c->ltab_sz;
1957 printk(KERN_DEBUG "LEB %d:%d, ltab\n", 1955 pr_err("LEB %d:%d, ltab\n", lnum, offs);
1958 lnum, offs);
1959 break; 1956 break;
1960 case UBIFS_LPT_LSAVE: 1957 case UBIFS_LPT_LSAVE:
1961 node_len = c->lsave_sz; 1958 node_len = c->lsave_sz;
1962 printk(KERN_DEBUG "LEB %d:%d, lsave len\n", lnum, offs); 1959 pr_err("LEB %d:%d, lsave len\n", lnum, offs);
1963 break; 1960 break;
1964 default: 1961 default:
1965 ubifs_err("LPT node type %d not recognized", node_type); 1962 ubifs_err("LPT node type %d not recognized", node_type);
@@ -1970,8 +1967,7 @@ static void dump_lpt_leb(const struct ubifs_info *c, int lnum)
1970 len -= node_len; 1967 len -= node_len;
1971 } 1968 }
1972 1969
1973 printk(KERN_DEBUG "(pid %d) finish dumping LEB %d\n", 1970 pr_err("(pid %d) finish dumping LEB %d\n", current->pid, lnum);
1974 current->pid, lnum);
1975out: 1971out:
1976 vfree(buf); 1972 vfree(buf);
1977 return; 1973 return;
@@ -1988,12 +1984,10 @@ void ubifs_dump_lpt_lebs(const struct ubifs_info *c)
1988{ 1984{
1989 int i; 1985 int i;
1990 1986
1991 printk(KERN_DEBUG "(pid %d) start dumping all LPT LEBs\n", 1987 pr_err("(pid %d) start dumping all LPT LEBs\n", current->pid);
1992 current->pid);
1993 for (i = 0; i < c->lpt_lebs; i++) 1988 for (i = 0; i < c->lpt_lebs; i++)
1994 dump_lpt_leb(c, i + c->lpt_first); 1989 dump_lpt_leb(c, i + c->lpt_first);
1995 printk(KERN_DEBUG "(pid %d) finish dumping all LPT LEBs\n", 1990 pr_err("(pid %d) finish dumping all LPT LEBs\n", current->pid);
1996 current->pid);
1997} 1991}
1998 1992
1999/** 1993/**