summaryrefslogtreecommitdiffstats
path: root/fs/udf
diff options
context:
space:
mode:
authorTyler Hicks <tyhicks@canonical.com>2011-12-12 17:02:30 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2012-03-10 22:05:38 +0100
commit978d6d8c4574098050b22281b9ed06818c0b23ca (patch)
tree7186772f24633adc91ce02ab532da80eda329532 /fs/udf
parentaio: fix the "too late munmap()" race (diff)
downloadlinux-978d6d8c4574098050b22281b9ed06818c0b23ca.tar.xz
linux-978d6d8c4574098050b22281b9ed06818c0b23ca.zip
vfs: Correctly set the dir i_mutex lockdep class
9a7aa12f3911853a 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: Tyler Hicks <tyhicks@canonical.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/udf')
0 files changed, 0 insertions, 0 deletions