1. 19 5月, 2009 1 次提交
    • H
      UBIFS: return error if link and unlink race · 8b3884a8
      Hunter Adrian 提交于
      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: NAdrian Hunter <adrian.hunter@nokia.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      8b3884a8
  2. 06 5月, 2009 1 次提交
  3. 30 4月, 2009 13 次提交
  4. 29 4月, 2009 25 次提交