[PATCH] use ->d_lock instead of dcache_lock in vfat_revalidate (2/6)

From: OGAWA Hirofumi
Date: Mon Oct 06 2003 - 11:57:43 EST


Hi,

This uses more fine granularity ->d_lock than ->dcache_lock for
->d_parent with d_move() race.

Please apply.

linux-2.6.0-test6-hirofumi/fs/vfat/namei.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN fs/vfat/namei.c~fat_d_lock-for-d_move fs/vfat/namei.c
--- linux-2.6.0-test6/fs/vfat/namei.c~fat_d_lock-for-d_move 2003-10-07 01:51:28.000000000 +0900
+++ linux-2.6.0-test6-hirofumi/fs/vfat/namei.c 2003-10-07 01:51:28.000000000 +0900
@@ -82,10 +82,10 @@ static int vfat_revalidate(struct dentry
*/
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;
}

_

--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/