Merge tag 'upstream-4.9-rc3' of git://git.infradead.org/linux-ubifs

Pull ubi/ubifs fixes from Richard Weinberger:
"This contains fixes for issues in both UBI and UBIFS:

- A regression wrt overlayfs, introduced in -rc2.
- An UBI issue, found by Dan Carpenter's static checker"

* tag 'upstream-4.9-rc3' of git://git.infradead.org/linux-ubifs:
ubifs: Fix regression in ubifs_readdir()
ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap()

Changed files
+13 -5
drivers
mtd
ubi
fs
ubifs
+5 -5
drivers/mtd/ubi/fastmap.c
··· 707 707 fmvhdr->vol_type, 708 708 be32_to_cpu(fmvhdr->last_eb_bytes)); 709 709 710 - if (!av) 711 - goto fail_bad; 712 - if (PTR_ERR(av) == -EINVAL) { 713 - ubi_err(ubi, "volume (ID %i) already exists", 714 - fmvhdr->vol_id); 710 + if (IS_ERR(av)) { 711 + if (PTR_ERR(av) == -EEXIST) 712 + ubi_err(ubi, "volume (ID %i) already exists", 713 + fmvhdr->vol_id); 714 + 715 715 goto fail_bad; 716 716 } 717 717
+8
fs/ubifs/dir.c
··· 543 543 544 544 if (err != -ENOENT) 545 545 ubifs_err(c, "cannot find next direntry, error %d", err); 546 + else 547 + /* 548 + * -ENOENT is a non-fatal error in this context, the TNC uses 549 + * it to indicate that the cursor moved past the current directory 550 + * and readdir() has to stop. 551 + */ 552 + err = 0; 553 + 546 554 547 555 /* 2 is a special value indicating that there are no more direntries */ 548 556 ctx->pos = 2;