Commit c7b5bb0b authored by hujianyang's avatar hujianyang Committed by Artem Bityutskiy

UBIFS: remove useless @ecc in struct ubifs_scan_leb

We set @ecc in ubifs_scan_leb only if leb_read returns EBADMSG and
do not use it any more. This patch removes this variable and adds
comments about EBADMSG handling.

Artem: re-phrase commentaries
Signed-off-by: default avatarhujianyang <hujianyang@huawei.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent b793a8c8
...@@ -157,9 +157,10 @@ struct ubifs_scan_leb *ubifs_start_scan(const struct ubifs_info *c, int lnum, ...@@ -157,9 +157,10 @@ struct ubifs_scan_leb *ubifs_start_scan(const struct ubifs_info *c, int lnum,
return ERR_PTR(err); return ERR_PTR(err);
} }
if (err == -EBADMSG) /*
sleb->ecc = 1; * Note, we ignore integrity errors (EBASMSG) because all the nodes are
* protected by CRC checksums.
*/
return sleb; return sleb;
} }
......
...@@ -314,7 +314,6 @@ struct ubifs_scan_node { ...@@ -314,7 +314,6 @@ struct ubifs_scan_node {
* @nodes_cnt: number of nodes scanned * @nodes_cnt: number of nodes scanned
* @nodes: list of struct ubifs_scan_node * @nodes: list of struct ubifs_scan_node
* @endpt: end point (and therefore the start of empty space) * @endpt: end point (and therefore the start of empty space)
* @ecc: read returned -EBADMSG
* @buf: buffer containing entire LEB scanned * @buf: buffer containing entire LEB scanned
*/ */
struct ubifs_scan_leb { struct ubifs_scan_leb {
...@@ -322,7 +321,6 @@ struct ubifs_scan_leb { ...@@ -322,7 +321,6 @@ struct ubifs_scan_leb {
int nodes_cnt; int nodes_cnt;
struct list_head nodes; struct list_head nodes;
int endpt; int endpt;
int ecc;
void *buf; void *buf;
}; };
......
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