lkml.org 
[lkml]   [2003]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] use ->d_lock instead of dcache_lock in vfat_revalidate (2/6)
From
Date
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@mail.parknet.co.jp>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:5.047 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site