]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] use ->d_lock instead of dcache_lock in vfat_revalidate (2/6)
authorHirofumi Ogawa <hirofumi@mail.parknet.co.jp>
Mon, 6 Oct 2003 04:01:47 +0000 (21:01 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 6 Oct 2003 04:01:47 +0000 (21:01 -0700)
This uses more fine granularity ->d_lock than ->dcache_lock for
->d_parent with d_move() race.

fs/vfat/namei.c

index 74ac9e70fc28a935e22ee71f62e953042ecfad43..d610af53967e282f88f7f41e3c4d2ebe45d9524d 100644 (file)
@@ -82,10 +82,10 @@ static int vfat_revalidate(struct dentry *dentry, struct nameidata *nd)
                 */
                ret = 0;
        else {
-               spin_lock(&dcache_lock);
+               spin_lock(&dentry->d_lock);
                if (dentry->d_time != dentry->d_parent->d_inode->i_version)
                        ret = 0;
-               spin_unlock(&dcache_lock);
+               spin_unlock(&dentry->d_lock);
        }
        return ret;
 }