diff options
Diffstat (limited to 'fs/ubifs/lprops.c')
-rw-r--r-- | fs/ubifs/lprops.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c index dfd2bcece27a..4cdd284dea56 100644 --- a/fs/ubifs/lprops.c +++ b/fs/ubifs/lprops.c | |||
@@ -635,10 +635,10 @@ const struct ubifs_lprops *ubifs_change_lp(struct ubifs_info *c, | |||
635 | * @c: UBIFS file-system description object | 635 | * @c: UBIFS file-system description object |
636 | * @st: return statistics | 636 | * @st: return statistics |
637 | */ | 637 | */ |
638 | void ubifs_get_lp_stats(struct ubifs_info *c, struct ubifs_lp_stats *st) | 638 | void ubifs_get_lp_stats(struct ubifs_info *c, struct ubifs_lp_stats *lst) |
639 | { | 639 | { |
640 | spin_lock(&c->space_lock); | 640 | spin_lock(&c->space_lock); |
641 | memcpy(st, &c->lst, sizeof(struct ubifs_lp_stats)); | 641 | memcpy(lst, &c->lst, sizeof(struct ubifs_lp_stats)); |
642 | spin_unlock(&c->space_lock); | 642 | spin_unlock(&c->space_lock); |
643 | } | 643 | } |
644 | 644 | ||
@@ -678,6 +678,9 @@ int ubifs_change_one_lp(struct ubifs_info *c, int lnum, int free, int dirty, | |||
678 | 678 | ||
679 | out: | 679 | out: |
680 | ubifs_release_lprops(c); | 680 | ubifs_release_lprops(c); |
681 | if (err) | ||
682 | ubifs_err("cannot change properties of LEB %d, error %d", | ||
683 | lnum, err); | ||
681 | return err; | 684 | return err; |
682 | } | 685 | } |
683 | 686 | ||
@@ -714,6 +717,9 @@ int ubifs_update_one_lp(struct ubifs_info *c, int lnum, int free, int dirty, | |||
714 | 717 | ||
715 | out: | 718 | out: |
716 | ubifs_release_lprops(c); | 719 | ubifs_release_lprops(c); |
720 | if (err) | ||
721 | ubifs_err("cannot update properties of LEB %d, error %d", | ||
722 | lnum, err); | ||
717 | return err; | 723 | return err; |
718 | } | 724 | } |
719 | 725 | ||
@@ -737,6 +743,8 @@ int ubifs_read_one_lp(struct ubifs_info *c, int lnum, struct ubifs_lprops *lp) | |||
737 | lpp = ubifs_lpt_lookup(c, lnum); | 743 | lpp = ubifs_lpt_lookup(c, lnum); |
738 | if (IS_ERR(lpp)) { | 744 | if (IS_ERR(lpp)) { |
739 | err = PTR_ERR(lpp); | 745 | err = PTR_ERR(lpp); |
746 | ubifs_err("cannot read properties of LEB %d, error %d", | ||
747 | lnum, err); | ||
740 | goto out; | 748 | goto out; |
741 | } | 749 | } |
742 | 750 | ||