diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-02 18:38:53 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:19:27 -0400 |
commit | d4d9cdcb470784df76304f75d0ce88f20f15fa6a (patch) | |
tree | 7066e4640947f078855b47501e69f76ff775a834 /fs/nfs/nfs4proc.c | |
parent | 5724ab37872042176916441930e78fd353be1e5e (diff) |
NFS: Don't hash the negative dentry when optimising for an O_EXCL open
We don't want to leave an unverified hashed negative dentry if the
exclusive create fails to complete.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 796bc8ea7194..0748c700301d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -1879,11 +1879,12 @@ nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr, | |||
1879 | } | 1879 | } |
1880 | state = nfs4_do_open(dir, &path, flags, sattr, cred); | 1880 | state = nfs4_do_open(dir, &path, flags, sattr, cred); |
1881 | put_rpccred(cred); | 1881 | put_rpccred(cred); |
1882 | d_drop(dentry); | ||
1882 | if (IS_ERR(state)) { | 1883 | if (IS_ERR(state)) { |
1883 | status = PTR_ERR(state); | 1884 | status = PTR_ERR(state); |
1884 | goto out; | 1885 | goto out; |
1885 | } | 1886 | } |
1886 | d_instantiate(dentry, igrab(state->inode)); | 1887 | d_add(dentry, igrab(state->inode)); |
1887 | if (flags & O_EXCL) { | 1888 | if (flags & O_EXCL) { |
1888 | struct nfs_fattr fattr; | 1889 | struct nfs_fattr fattr; |
1889 | status = nfs4_do_setattr(state->inode, &fattr, sattr, state); | 1890 | status = nfs4_do_setattr(state->inode, &fattr, sattr, state); |