UBIFS: remove useless @ecc in struct ubifs_scan_leb
authorhujianyang <hujianyang@huawei.com>
Tue, 24 Jun 2014 03:46:36 +0000 (11:46 +0800)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Sat, 19 Jul 2014 06:53:51 +0000 (09:53 +0300)
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>
fs/ubifs/scan.c
fs/ubifs/ubifs.h

index 58aa05df2bb66848513e3a11718049dc9cddd1f1..e5b7c591841b9a09e24aefd5261476ab60d83ca9 100644 (file)
@@ -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;
 }
 
index c1f71fe17cc00e72212bf84033117581a5dd04f3..977a01bf1720c6c6cd3a9c67465ac0b870d1d0fc 100644 (file)
@@ -314,7 +314,6 @@ 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 {
@@ -322,7 +321,6 @@ struct ubifs_scan_leb {
        int nodes_cnt;
        struct list_head nodes;
        int endpt;
-       int ecc;
        void *buf;
 };