aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat/namei_vfat.c
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2008-11-06 15:53:52 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-06 18:41:21 -0500
commit1c13a243a461dd5b089d29e5d57f260c990e462c (patch)
tree2d9e6be66c1854cdc172708357d95800ec8e93ed /fs/fat/namei_vfat.c
parent1b52467243c7167b3a267ddbcbb14d550f28eb4a (diff)
fat: Kill d_invalidate() in vfat_lookup()
d_invalidate() for positive dentry doesn't work in some cases (vfsmount, nfsd, and maybe others). shrink_dcache_parent() by d_invalidate() is pointless for vfat usage at all. So, this kills it, and intead of it uses d_move(). To save old behavior, this returns alias simply for directory (don't change pwd, etc..). the directory lookup shouldn't be important for performance. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fat/namei_vfat.c')
-rw-r--r--fs/fat/namei_vfat.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index d585398f9f6b..bf326d4356a3 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -745,13 +745,12 @@ static struct dentry *vfat_lookup(struct inode *dir, struct dentry *dentry,
745 * 745 *
746 * Switch to new one for reason of locality if possible. 746 * Switch to new one for reason of locality if possible.
747 */ 747 */
748 if (d_invalidate(alias) == 0) 748 BUG_ON(d_unhashed(alias));
749 dput(alias); 749 if (!S_ISDIR(inode->i_mode))
750 else { 750 d_move(alias, dentry);
751 iput(inode); 751 iput(inode);
752 unlock_super(sb); 752 unlock_super(sb);
753 return alias; 753 return alias;
754 }
755 } 754 }
756out: 755out:
757 unlock_super(sb); 756 unlock_super(sb);