1. 08 4月, 2011 5 次提交
  2. 07 4月, 2011 1 次提交
  3. 06 4月, 2011 26 次提交
  4. 05 4月, 2011 8 次提交
    • A
      UBI: do not select KALLSYMS_ALL · 6bef0b67
      Artem Bityutskiy 提交于
      All UBI needs is to make sure we stacktraces when UBI debugging
      is enabled. It is enough to select KALLSYMS for this, KALLSYMS_ALL
      is not necessary.
      
      And the current Kconfig line we have:
      
      select KALLSYMS_ALL if KALLSYMS && DEBUG_KERNEL
      
      is just too complex to be sane and right. But this "if" part there
      is needed to prevent "unmet direct dependency" warnings, because
      KALLSYMS_ALL depends on KALLSYMS and DEBUG_KERNEL, so we cannot
      just select KALLSYMS_ALL.
      
      Anyway, this feels messy, and we do not seem to really need KALLSYMS_ALL,
      so select KALLSYMS instead.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Acked-by: NRandy Dunlap <randy.dunlap@oracle.com>
      6bef0b67
    • A
      UBI: do not compare array with NULL · 6e5133cc
      Artem Bityutskiy 提交于
      Coverity spotted that UBI debugging code tries to compare
      an array and NULL, which obviously makes little sense. Kill
      this check.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      6e5133cc
    • A
      UBI: check if we are in RO mode in the erase routine · 3efe5090
      Artem Bityutskiy 提交于
      'do_sync_erase()' has to check whether we are in R/O mode before
      erasing the PEB. This patch adds the check and while on it, adds an
      assertion which validates the 'pnum' argument, as well as removes
      a check which is always true because it has already been done
      few lines before.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      3efe5090
    • A
      UBIFS: fix debugging failure in dbg_check_space_info · 7da6443a
      Artem Bityutskiy 提交于
      This patch fixes a debugging failure with which looks like this:
      UBIFS error (pid 32313): dbg_check_space_info: free space changed from 6019344 to 6022654
      
      The reason for this failure is described in the comment this patch adds
      to the code. But in short - 'c->freeable_cnt' may be different before
      and after re-mounting, and this is normal. So the debugging code should
      make sure that free space calculations do not depend on 'c->freeable_cnt'.
      
      A similar issue has been reported here:
      http://lists.infradead.org/pipermail/linux-mtd/2011-April/034647.html
      
      This patch should fix it.
      
      For the -stable guys: this patch is only relevant for kernels 2.6.30
      onwards.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Cc: stable@kernel.org [2.6.30+]
      7da6443a
    • A
      UBIFS: fix error path in dbg_debugfs_init_fs · 95169535
      Artem Bityutskiy 提交于
      The debug interface is substandard and on error returns either
      NULL or an error code packed in the pointer. So using "IS_ERR"
      for the pointers returned by debugfs function is incorrect.
      Instead, we should use IS_ERR_OR_NULL.
      
      This path is an improved vestion of the original patch from
      Phil Carmody.
      Reported-by: NPhil Carmody <ext-phil.2.carmody@nokia.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Acked-by: NPhil Carmody <ext-phil.2.carmody@nokia.com>
      95169535
    • A
      UBIFS: unify error path dbg_debugfs_init_fs · cc6a86b9
      Artem Bityutskiy 提交于
      This is just a small clean-up patch which simlifies and unifies the
      error path in the dbg_debugfs_init_fs(). We have common error path
      for all failure cases in this function except of the very first
      case. And this patch makes the first failure case use the same
      error path as the other cases by using the 'fname' and 'dent'
      variables.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Acked-by: NPhil Carmody <ext-phil.2.carmody@nokia.com>
      cc6a86b9
    • A
      UBIFS: do not select KALLSYMS_ALL · 81354de3
      Artem Bityutskiy 提交于
      All UBIFS needs is to make sure we stacktraces when UBIFS debugging
      is enabled. It is enough to select KALLSYMS for this, KALLSYMS_ALL
      is not necessary. Moreover, Randy Dunlap reported that UBIFS causes
      the following Kconfig dependency warning:
      
      warning: (UBIFS_FS_DEBUG && LOCKDEP && LATENCYTOP) selects KALLSYMS_ALL
      which has unmet direct dependencies (DEBUG_KERNEL && KALLSYMS)
      
      The reason is that KALLSYMS_ALL requires DEBUG_KERNEL and KALLSYMS, so
      ideally, to select KALLSYMS_ALL we'd need to select DEBUG_KERNEL and
      KALLSYMS first.
      
      This seems to be too much to select. The easiest way to go is to forget
      about KALLSYMS_ALL and just select KALLSYMS when UBIFS debugging is
      enabled - that should be enough for stackdumps.
      Reported-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Acked-by: NRandy Dunlap <randy.dunlap@oracle.com>
      81354de3
    • A
      UBIFS: fix assertion warnings · c88ac00c
      Artem Bityutskiy 提交于
      This patch fixes UBIFS assertion warnings like:
      
      UBIFS assert failed in ubifs_leb_unmap at 135 (pid 29365)
      Pid: 29365, comm: integck Tainted: G          I 2.6.37-ubi-2.6+ #34
      Call Trace:
       [<ffffffffa047c663>] ubifs_lpt_init+0x95e/0x9ee [ubifs]
       [<ffffffffa04623a7>] ubifs_remount_fs+0x2c7/0x762 [ubifs]
       [<ffffffff810f066e>] do_remount_sb+0xb6/0x101
       [<ffffffff81106ff4>] ? do_mount+0x191/0x78e
       [<ffffffff811070bb>] do_mount+0x258/0x78e
       [<ffffffff810da1e8>] ? alloc_pages_current+0xa2/0xc5
       [<ffffffff81107674>] sys_mount+0x83/0xbd
       [<ffffffff81009a12>] system_call_fastpath+0x16/0x1b
      
      They happen when we re-mount from R/O mode to R/W mode. While
      re-mounting, we write to the media, but we still have the c->ro_mount
      flag set. The fix is very simple - just clear the flag before
      starting re-mounting R/W.
      
      These warnings are caused by the following commit:
      2ef13294
      
      For -stable guys: this bug was introduced in 2.6.38, this is materieal
      for 2.6.38-stable.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Cc: stable@kernel.org [2.6.38]
      c88ac00c