From 74d0e860914d84f397acd6fa10db2a25288018d8 Mon Sep 17 00:00:00 2001 From: OGAWA Hirofumi Date: Thu, 6 Nov 2008 12:53:52 -0800 Subject: [PATCH] --- yaml --- r: 118460 b: refs/heads/master c: 1c13a243a461dd5b089d29e5d57f260c990e462c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/fat/namei_vfat.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index d3e55451707e..7d8c48aab75a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1b52467243c7167b3a267ddbcbb14d550f28eb4a +refs/heads/master: 1c13a243a461dd5b089d29e5d57f260c990e462c diff --git a/trunk/fs/fat/namei_vfat.c b/trunk/fs/fat/namei_vfat.c index d585398f9f6b..bf326d4356a3 100644 --- a/trunk/fs/fat/namei_vfat.c +++ b/trunk/fs/fat/namei_vfat.c @@ -745,13 +745,12 @@ static struct dentry *vfat_lookup(struct inode *dir, struct dentry *dentry, * * Switch to new one for reason of locality if possible. */ - if (d_invalidate(alias) == 0) - dput(alias); - else { - iput(inode); - unlock_super(sb); - return alias; - } + BUG_ON(d_unhashed(alias)); + if (!S_ISDIR(inode->i_mode)) + d_move(alias, dentry); + iput(inode); + unlock_super(sb); + return alias; } out: unlock_super(sb);