aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ubifs/debug.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 06d171cefe45..ba4d795d63a3 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -2650,7 +2650,7 @@ int dbg_leb_read(struct ubi_volume_desc *desc, int lnum, char *buf, int offset,
2650 int len, int check) 2650 int len, int check)
2651{ 2651{
2652 if (in_failure_mode(desc)) 2652 if (in_failure_mode(desc))
2653 return -EIO; 2653 return -EROFS;
2654 return ubi_leb_read(desc, lnum, buf, offset, len, check); 2654 return ubi_leb_read(desc, lnum, buf, offset, len, check);
2655} 2655}
2656 2656
@@ -2660,7 +2660,7 @@ int dbg_leb_write(struct ubi_volume_desc *desc, int lnum, const void *buf,
2660 int err, failing; 2660 int err, failing;
2661 2661
2662 if (in_failure_mode(desc)) 2662 if (in_failure_mode(desc))
2663 return -EIO; 2663 return -EROFS;
2664 failing = do_fail(desc, lnum, 1); 2664 failing = do_fail(desc, lnum, 1);
2665 if (failing) 2665 if (failing)
2666 cut_data(buf, len); 2666 cut_data(buf, len);
@@ -2668,7 +2668,7 @@ int dbg_leb_write(struct ubi_volume_desc *desc, int lnum, const void *buf,
2668 if (err) 2668 if (err)
2669 return err; 2669 return err;
2670 if (failing) 2670 if (failing)
2671 return -EIO; 2671 return -EROFS;
2672 return 0; 2672 return 0;
2673} 2673}
2674 2674
@@ -2678,12 +2678,12 @@ int dbg_leb_change(struct ubi_volume_desc *desc, int lnum, const void *buf,
2678 int err; 2678 int err;
2679 2679
2680 if (do_fail(desc, lnum, 1)) 2680 if (do_fail(desc, lnum, 1))
2681 return -EIO; 2681 return -EROFS;
2682 err = ubi_leb_change(desc, lnum, buf, len, dtype); 2682 err = ubi_leb_change(desc, lnum, buf, len, dtype);
2683 if (err) 2683 if (err)
2684 return err; 2684 return err;
2685 if (do_fail(desc, lnum, 1)) 2685 if (do_fail(desc, lnum, 1))
2686 return -EIO; 2686 return -EROFS;
2687 return 0; 2687 return 0;
2688} 2688}
2689 2689
@@ -2692,12 +2692,12 @@ int dbg_leb_erase(struct ubi_volume_desc *desc, int lnum)
2692 int err; 2692 int err;
2693 2693
2694 if (do_fail(desc, lnum, 0)) 2694 if (do_fail(desc, lnum, 0))
2695 return -EIO; 2695 return -EROFS;
2696 err = ubi_leb_erase(desc, lnum); 2696 err = ubi_leb_erase(desc, lnum);
2697 if (err) 2697 if (err)
2698 return err; 2698 return err;
2699 if (do_fail(desc, lnum, 0)) 2699 if (do_fail(desc, lnum, 0))
2700 return -EIO; 2700 return -EROFS;
2701 return 0; 2701 return 0;
2702} 2702}
2703 2703
@@ -2706,19 +2706,19 @@ int dbg_leb_unmap(struct ubi_volume_desc *desc, int lnum)
2706 int err; 2706 int err;
2707 2707
2708 if (do_fail(desc, lnum, 0)) 2708 if (do_fail(desc, lnum, 0))
2709 return -EIO; 2709 return -EROFS;
2710 err = ubi_leb_unmap(desc, lnum); 2710 err = ubi_leb_unmap(desc, lnum);
2711 if (err) 2711 if (err)
2712 return err; 2712 return err;
2713 if (do_fail(desc, lnum, 0)) 2713 if (do_fail(desc, lnum, 0))
2714 return -EIO; 2714 return -EROFS;
2715 return 0; 2715 return 0;
2716} 2716}
2717 2717
2718int dbg_is_mapped(struct ubi_volume_desc *desc, int lnum) 2718int dbg_is_mapped(struct ubi_volume_desc *desc, int lnum)
2719{ 2719{
2720 if (in_failure_mode(desc)) 2720 if (in_failure_mode(desc))
2721 return -EIO; 2721 return -EROFS;
2722 return ubi_is_mapped(desc, lnum); 2722 return ubi_is_mapped(desc, lnum);
2723} 2723}
2724 2724
@@ -2727,12 +2727,12 @@ int dbg_leb_map(struct ubi_volume_desc *desc, int lnum, int dtype)
2727 int err; 2727 int err;
2728 2728
2729 if (do_fail(desc, lnum, 0)) 2729 if (do_fail(desc, lnum, 0))
2730 return -EIO; 2730 return -EROFS;
2731 err = ubi_leb_map(desc, lnum, dtype); 2731 err = ubi_leb_map(desc, lnum, dtype);
2732 if (err) 2732 if (err)
2733 return err; 2733 return err;
2734 if (do_fail(desc, lnum, 0)) 2734 if (do_fail(desc, lnum, 0))
2735 return -EIO; 2735 return -EROFS;
2736 return 0; 2736 return 0;
2737} 2737}
2738 2738