]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: invalidate dentry if its dentry_lock isn't initialized.
authorTao Ma <tao.ma@oracle.com>
Thu, 27 Aug 2009 06:46:56 +0000 (14:46 +0800)
committerJoel Becker <joel.becker@oracle.com>
Fri, 28 Aug 2009 01:10:54 +0000 (18:10 -0700)
commit12375b7d707bce710887b027fa90330d6fcd197c
treeb782aaa5e2775c693bb711647e9e2b2331003fb4
parentac2df097b836c237ac24d9b443ed1368d0096b9c
ocfs2: invalidate dentry if its dentry_lock isn't initialized.

In commit 564da9c972b3c777a27764356594803b5efc1998, when
ocfs2_attch_dentry_lock fails, we call an extra iput and reset
dentry->d_fsdata to NULL. This resolve a bug, but it isn't
completed and the dentry is still there. When we want to use
it again, ocfs2_dentry_revalidate doesn't catch it and return
true. That make future ocfs2_dentry_lock panic out.
One bug is http://oss.oracle.com/bugzilla/show_bug.cgi?id=1162.

The resolution is to add a check for dentry->d_fsdata in
revalidate process and return false if dentry->d_fsdata is NULL,
so that a new ocfs2_lookup will be called again.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/dcache.c