From 83282d6f369207a2840dada7762e557c34c62187 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Tue, 2 Oct 2007 18:38:53 -0400 Subject: [PATCH] --- yaml --- r: 69267 b: refs/heads/master c: d4d9cdcb470784df76304f75d0ce88f20f15fa6a h: refs/heads/master i: 69265: a61bfa08afff91f6bf5dc5be0f17405918a22ee8 69263: fb495c9982209b6892b2ed03726a19f4fa05ffde v: v3 --- [refs] | 2 +- trunk/fs/nfs/dir.c | 5 +++-- trunk/fs/nfs/nfs4proc.c | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 1bec3ae90e6d..55739bd1696c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5724ab37872042176916441930e78fd353be1e5e +refs/heads/master: d4d9cdcb470784df76304f75d0ce88f20f15fa6a diff --git a/trunk/fs/nfs/dir.c b/trunk/fs/nfs/dir.c index 3f0def65b8ab..166a833be661 100644 --- a/trunk/fs/nfs/dir.c +++ b/trunk/fs/nfs/dir.c @@ -992,9 +992,10 @@ static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry } dentry->d_op = NFS_PROTO(dir)->dentry_ops; - /* Let vfs_create() deal with O_EXCL */ + /* Let vfs_create() deal with O_EXCL. Instantiate, but don't hash + * the dentry. */ if (nd->intent.open.flags & O_EXCL) { - d_add(dentry, NULL); + d_instantiate(dentry, NULL); goto out; } diff --git a/trunk/fs/nfs/nfs4proc.c b/trunk/fs/nfs/nfs4proc.c index 796bc8ea7194..0748c700301d 100644 --- a/trunk/fs/nfs/nfs4proc.c +++ b/trunk/fs/nfs/nfs4proc.c @@ -1879,11 +1879,12 @@ nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr, } state = nfs4_do_open(dir, &path, flags, sattr, cred); put_rpccred(cred); + d_drop(dentry); if (IS_ERR(state)) { status = PTR_ERR(state); goto out; } - d_instantiate(dentry, igrab(state->inode)); + d_add(dentry, igrab(state->inode)); if (flags & O_EXCL) { struct nfs_fattr fattr; status = nfs4_do_setattr(state->inode, &fattr, sattr, state);