lpt_commit.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) lpt_commit.c (88dca4ca5a93d2c09e5bbc6a62fbfc3af83c4fca)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * This file is part of UBIFS.
4 *
5 * Copyright (C) 2006-2008 Nokia Corporation.
6 *
7 * Authors: Adrian Hunter
8 * Artem Bityutskiy (Битюцкий Артём)

--- 1582 unchanged lines hidden (view full) ---

1591{
1592 int err, len = c->leb_size, dirty = 0, node_type, node_num, node_len;
1593 int ret;
1594 void *buf, *p;
1595
1596 if (!dbg_is_chk_lprops(c))
1597 return 0;
1598
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * This file is part of UBIFS.
4 *
5 * Copyright (C) 2006-2008 Nokia Corporation.
6 *
7 * Authors: Adrian Hunter
8 * Artem Bityutskiy (Битюцкий Артём)

--- 1582 unchanged lines hidden (view full) ---

1591{
1592 int err, len = c->leb_size, dirty = 0, node_type, node_num, node_len;
1593 int ret;
1594 void *buf, *p;
1595
1596 if (!dbg_is_chk_lprops(c))
1597 return 0;
1598
1599 buf = p = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);
1599 buf = p = __vmalloc(c->leb_size, GFP_NOFS);
1600 if (!buf) {
1601 ubifs_err(c, "cannot allocate memory for ltab checking");
1602 return 0;
1603 }
1604
1605 dbg_lp("LEB %d", lnum);
1606
1607 err = ubifs_leb_read(c, lnum, buf, 0, c->leb_size, 1);

--- 232 unchanged lines hidden (view full) ---

1840 * dump LPT area LEBs. Note, LPT has to be locked by the caller.
1841 */
1842static void dump_lpt_leb(const struct ubifs_info *c, int lnum)
1843{
1844 int err, len = c->leb_size, node_type, node_num, node_len, offs;
1845 void *buf, *p;
1846
1847 pr_err("(pid %d) start dumping LEB %d\n", current->pid, lnum);
1600 if (!buf) {
1601 ubifs_err(c, "cannot allocate memory for ltab checking");
1602 return 0;
1603 }
1604
1605 dbg_lp("LEB %d", lnum);
1606
1607 err = ubifs_leb_read(c, lnum, buf, 0, c->leb_size, 1);

--- 232 unchanged lines hidden (view full) ---

1840 * dump LPT area LEBs. Note, LPT has to be locked by the caller.
1841 */
1842static void dump_lpt_leb(const struct ubifs_info *c, int lnum)
1843{
1844 int err, len = c->leb_size, node_type, node_num, node_len, offs;
1845 void *buf, *p;
1846
1847 pr_err("(pid %d) start dumping LEB %d\n", current->pid, lnum);
1848 buf = p = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);
1848 buf = p = __vmalloc(c->leb_size, GFP_NOFS);
1849 if (!buf) {
1850 ubifs_err(c, "cannot allocate memory to dump LPT");
1851 return;
1852 }
1853
1854 err = ubifs_leb_read(c, lnum, buf, 0, c->leb_size, 1);
1855 if (err)
1856 goto out;

--- 141 unchanged lines hidden ---
1849 if (!buf) {
1850 ubifs_err(c, "cannot allocate memory to dump LPT");
1851 return;
1852 }
1853
1854 err = ubifs_leb_read(c, lnum, buf, 0, c->leb_size, 1);
1855 if (err)
1856 goto out;

--- 141 unchanged lines hidden ---