diff options
author | hujianyang <hujianyang@huawei.com> | 2014-06-23 23:46:36 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-07-19 02:53:51 -0400 |
commit | c7b5bb0beb80e5ee993118ae82d0b8264526b6bf (patch) | |
tree | 05423b7e781a036807e903f15ad7763ea580ec24 /fs/ubifs | |
parent | b793a8c8885d87d9867fb2dbfdc1ef7b5877d71b (diff) |
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: hujianyang <hujianyang@huawei.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs/ubifs')
-rw-r--r-- | fs/ubifs/scan.c | 7 | ||||
-rw-r--r-- | fs/ubifs/ubifs.h | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c index 58aa05df2bb6..e5b7c591841b 100644 --- a/fs/ubifs/scan.c +++ b/fs/ubifs/scan.c | |||
@@ -157,9 +157,10 @@ struct ubifs_scan_leb *ubifs_start_scan(const struct ubifs_info *c, int lnum, | |||
157 | return ERR_PTR(err); | 157 | return ERR_PTR(err); |
158 | } | 158 | } |
159 | 159 | ||
160 | if (err == -EBADMSG) | 160 | /* |
161 | sleb->ecc = 1; | 161 | * Note, we ignore integrity errors (EBASMSG) because all the nodes are |
162 | 162 | * protected by CRC checksums. | |
163 | */ | ||
163 | return sleb; | 164 | return sleb; |
164 | } | 165 | } |
165 | 166 | ||
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index c1f71fe17cc0..977a01bf1720 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h | |||
@@ -314,7 +314,6 @@ struct ubifs_scan_node { | |||
314 | * @nodes_cnt: number of nodes scanned | 314 | * @nodes_cnt: number of nodes scanned |
315 | * @nodes: list of struct ubifs_scan_node | 315 | * @nodes: list of struct ubifs_scan_node |
316 | * @endpt: end point (and therefore the start of empty space) | 316 | * @endpt: end point (and therefore the start of empty space) |
317 | * @ecc: read returned -EBADMSG | ||
318 | * @buf: buffer containing entire LEB scanned | 317 | * @buf: buffer containing entire LEB scanned |
319 | */ | 318 | */ |
320 | struct ubifs_scan_leb { | 319 | struct ubifs_scan_leb { |
@@ -322,7 +321,6 @@ struct ubifs_scan_leb { | |||
322 | int nodes_cnt; | 321 | int nodes_cnt; |
323 | struct list_head nodes; | 322 | struct list_head nodes; |
324 | int endpt; | 323 | int endpt; |
325 | int ecc; | ||
326 | void *buf; | 324 | void *buf; |
327 | }; | 325 | }; |
328 | 326 | ||