summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2010-01-07 00:48:26 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-01-07 00:48:26 +0100
commit56335936de1a41c8978fde62b2158af77ddc7258 (patch)
treef0061bef629a1c6a14e08f1b660b3beca0adc7cd /fs/nfs
parentsunrpc: fix build-time warning (diff)
downloadlinux-56335936de1a41c8978fde62b2158af77ddc7258.tar.xz
linux-56335936de1a41c8978fde62b2158af77ddc7258.zip
nfs: fix oops in nfs_rename()
Recent change is missing to update "rehash". With that change, it will become the cause of adding dentry to hash twice. This explains the reason of Oops (dereference the freed dentry in __d_lookup()) on my machine. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Reported-by: Marvin <marvin24@gmx.de> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/dir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 2c5ace4f00a7..3c7f03b669fb 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1615,6 +1615,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
goto out;
new_dentry = dentry;
+ rehash = NULL;
new_inode = NULL;
}
}