1. 11 3月, 2012 2 次提交
    • J
      udf: Fix deadlock in udf_release_file() · f6940fe9
      Jan Kara 提交于
      udf_release_file() can be called from munmap() path with mmap_sem held.  Thus
      we cannot take i_mutex there because that ranks above mmap_sem. Luckily,
      i_mutex is not needed in udf_release_file() anymore since protection by
      i_data_sem is enough to protect from races with write and truncate.
      Reported-by: NAl Viro <viro@ZenIV.linux.org.uk>
      Reviewed-by: NNamjae Jeon <linkinjeon@gmail.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      f6940fe9
    • T
      vfs: Correctly set the dir i_mutex lockdep class · 978d6d8c
      Tyler Hicks 提交于
      9a7aa12f introduced additional logic around setting the i_mutex
      lockdep class for directory inodes. The idea was that some filesystems
      may want their own special lockdep class for different directory
      inodes and calling unlock_new_inode() should not clobber one of
      those special classes.
      
      I believe that the added conditional, around the *negated* return value
      of lockdep_match_class(), caused directory inodes to be placed in the
      wrong lockdep class.
      
      inode_init_always() sets the i_mutex lockdep class with i_mutex_key for
      all inodes. If the filesystem did not change the class during inode
      initialization, then the conditional mentioned above was false and the
      directory inode was incorrectly left in the non-directory lockdep class.
      If the filesystem did set a special lockdep class, then the conditional
      mentioned above was true and that class was clobbered with
      i_mutex_dir_key.
      
      This patch removes the negation from the conditional so that the i_mutex
      lockdep class is properly set for directory inodes. Special classes are
      preserved and directory inodes with unmodified classes are set with
      i_mutex_dir_key.
      Signed-off-by: NTyler Hicks <tyhicks@canonical.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      978d6d8c
  2. 10 3月, 2012 7 次提交
  3. 09 3月, 2012 13 次提交
  4. 08 3月, 2012 18 次提交