1. 29 May, 2009 1 commit
    • Artem Bityutskiy's avatar
      UBIFS: remove dead code · 428ff9d2
      Artem Bityutskiy authored
      UBIFS assumes that @c->min_io_size is 8 in case of NOR flash. This
      is because UBIFS alignes all nodes to 8-byte boundary, and maintaining
      @c->min_io_size introduced unnecessary complications.
      
      This patch removes senseless constructs like:
      
      if (c->min_io_size == 1)
      	NOR-specific code
      
      Also, few commentaries amendments.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      428ff9d2
  2. 26 May, 2009 1 commit
    • Artem Bityutskiy's avatar
      UBIFS: use anonymous device · 7c83f5cb
      Artem Bityutskiy authored
      UBIFS has erroneuosly set 'sb->s_dev' to the UBI volume
      character device major/minor. This may lead to clashes
      if there is another FS mounted to a block device with
      the same major/minor numbers. User-space programs which
      use 'stat->st_dev' may get confused because of this.
      
      This problem was found by Al Viro. He also pointed the
      way to fix the problem - use 'set_anon_super()' and
      'kill_anon_super()' VFS helpers.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      7c83f5cb
  3. 25 May, 2009 1 commit
  4. 19 May, 2009 1 commit
    • Hunter Adrian's avatar
      UBIFS: return error if link and unlink race · 8b3884a8
      Hunter Adrian authored
      Consider a scenario when 'vfs_link(dirA/fileA)' and
      'vfs_unlink(dirA/fileA, dirB/fileB)' race. 'vfs_link()' does not
      lock 'dirA->i_mutex', so this is possible. Both of the functions
      lock 'fileA->i_mutex' though. Suppose 'vfs_unlink()' wins, and takes
      'fileA->i_mutex' mutex first. Suppose 'fileA->i_nlink' is 1. In this
      case 'ubifs_unlink()' will drop the last reference, and put 'inodeA'
      to the list of orphans. After this, 'vfs_link()' will link
      'dirB/fileB' to 'inodeA'. Thir is a problem because, for example,
      the subsequent 'vfs_unlink(dirB/fileB)' will add the same inode
      to the list of orphans.
      
      This problem was reported by J. R. Okajima <hooanon05@yahoo.co.jp>
      
      [Artem: add more comments, amended commit message]
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@nokia.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      8b3884a8
  5. 06 May, 2009 1 commit
  6. 30 Apr, 2009 3 commits
  7. 29 Apr, 2009 16 commits
  8. 28 Apr, 2009 16 commits