UBI: rename ubi_scan_add_used
The old name is not logical anymore - rename it to 'ubi_add_to_av()'. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
This commit is contained in:
parent
ee663d9292
commit
3561188ac2
|
@ -425,7 +425,7 @@ out_free_vidh:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ubi_scan_add_used - add physical eraseblock to the attaching information.
|
* ubi_add_to_av - add physical eraseblock to the attaching information.
|
||||||
* @ubi: UBI device description object
|
* @ubi: UBI device description object
|
||||||
* @ai: attaching information
|
* @ai: attaching information
|
||||||
* @pnum: the physical eraseblock number
|
* @pnum: the physical eraseblock number
|
||||||
|
@ -440,9 +440,8 @@ out_free_vidh:
|
||||||
* to be picked, while the older one has to be dropped. This function returns
|
* to be picked, while the older one has to be dropped. This function returns
|
||||||
* zero in case of success and a negative error code in case of failure.
|
* zero in case of success and a negative error code in case of failure.
|
||||||
*/
|
*/
|
||||||
int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_attach_info *ai,
|
int ubi_add_to_av(struct ubi_device *ubi, struct ubi_attach_info *ai, int pnum,
|
||||||
int pnum, int ec, const struct ubi_vid_hdr *vid_hdr,
|
int ec, const struct ubi_vid_hdr *vid_hdr, int bitflips)
|
||||||
int bitflips)
|
|
||||||
{
|
{
|
||||||
int err, vol_id, lnum;
|
int err, vol_id, lnum;
|
||||||
unsigned long long sqnum;
|
unsigned long long sqnum;
|
||||||
|
@ -1016,7 +1015,7 @@ static int process_eb(struct ubi_device *ubi, struct ubi_attach_info *ai,
|
||||||
if (ec_err)
|
if (ec_err)
|
||||||
ubi_warn("valid VID header but corrupted EC header at PEB %d",
|
ubi_warn("valid VID header but corrupted EC header at PEB %d",
|
||||||
pnum);
|
pnum);
|
||||||
err = ubi_scan_add_used(ubi, ai, pnum, ec, vidh, bitflips);
|
err = ubi_add_to_av(ubi, ai, pnum, ec, vidh, bitflips);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
|
|
@ -157,9 +157,8 @@ static inline void ubi_scan_move_to_list(struct ubi_ainf_volume *av,
|
||||||
list_add_tail(&aeb->u.list, list);
|
list_add_tail(&aeb->u.list, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_attach_info *ai,
|
int ubi_add_to_av(struct ubi_device *ubi, struct ubi_attach_info *ai, int pnum,
|
||||||
int pnum, int ec, const struct ubi_vid_hdr *vid_hdr,
|
int ec, const struct ubi_vid_hdr *vid_hdr, int bitflips);
|
||||||
int bitflips);
|
|
||||||
struct ubi_ainf_volume *ubi_scan_find_av(const struct ubi_attach_info *ai,
|
struct ubi_ainf_volume *ubi_scan_find_av(const struct ubi_attach_info *ai,
|
||||||
int vol_id);
|
int vol_id);
|
||||||
void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av);
|
void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av);
|
||||||
|
|
|
@ -338,10 +338,9 @@ retry:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* And add it to the attaching information. Don't delete the old version
|
* And add it to the attaching information. Don't delete the old version
|
||||||
* of this LEB as it will be deleted and freed in 'ubi_scan_add_used()'.
|
* of this LEB as it will be deleted and freed in 'ubi_add_to_av()'.
|
||||||
*/
|
*/
|
||||||
err = ubi_scan_add_used(ubi, ai, new_aeb->pnum, new_aeb->ec,
|
err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0);
|
||||||
vid_hdr, 0);
|
|
||||||
kfree(new_aeb);
|
kfree(new_aeb);
|
||||||
ubi_free_vid_hdr(ubi, vid_hdr);
|
ubi_free_vid_hdr(ubi, vid_hdr);
|
||||||
return err;
|
return err;
|
||||||
|
@ -428,7 +427,7 @@ static struct ubi_vtbl_record *process_lvol(struct ubi_device *ubi,
|
||||||
* aeb->scrub). If the data is not OK, the contents of
|
* aeb->scrub). If the data is not OK, the contents of
|
||||||
* the PEB will be recovered from the second copy, and
|
* the PEB will be recovered from the second copy, and
|
||||||
* aeb->scrub will be cleared in
|
* aeb->scrub will be cleared in
|
||||||
* 'ubi_scan_add_used()'.
|
* 'ubi_add_to_av()'.
|
||||||
*/
|
*/
|
||||||
aeb->scrub = 1;
|
aeb->scrub = 1;
|
||||||
else if (err)
|
else if (err)
|
||||||
|
|
Loading…
Reference in New Issue