Skip to content

Commit

Permalink
UBIFS: remove useless @ecc in struct ubifs_scan_leb
Browse files Browse the repository at this point in the history
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: hujianyang <hujianyang@huawei.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
  • Loading branch information
hujianyang authored and Artem Bityutskiy committed Jul 19, 2014
1 parent b793a8c commit c7b5bb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 4 additions & 3 deletions fs/ubifs/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,10 @@ struct ubifs_scan_leb *ubifs_start_scan(const struct ubifs_info *c, int lnum,
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;
}

Expand Down
2 changes: 0 additions & 2 deletions fs/ubifs/ubifs.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,13 @@ struct ubifs_scan_node {
* @nodes_cnt: number of nodes scanned
* @nodes: list of struct ubifs_scan_node
* @endpt: end point (and therefore the start of empty space)
* @ecc: read returned -EBADMSG
* @buf: buffer containing entire LEB scanned
*/
struct ubifs_scan_leb {
int lnum;
int nodes_cnt;
struct list_head nodes;
int endpt;
int ecc;
void *buf;
};

Expand Down

0 comments on commit c7b5bb0

Please sign in to comment.