diff --git a/[refs] b/[refs] index 7bc5eb34f750..67754820e860 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0c2e53f11a6dae9e3af5f50f5ad0382e7c3e0cfa +refs/heads/master: 08ef7bd3bc04261d14d570ac7eaac3eac947b1ba diff --git a/trunk/fs/nfs/nfs4proc.c b/trunk/fs/nfs/nfs4proc.c index b0c01b23422d..ba0da50865fe 100644 --- a/trunk/fs/nfs/nfs4proc.c +++ b/trunk/fs/nfs/nfs4proc.c @@ -1593,8 +1593,14 @@ static int _nfs4_proc_open(struct nfs4_opendata *data) int status; status = nfs4_run_open_task(data, 0); - if (status != 0 || !data->rpc_done) + if (!data->rpc_done) + return status; + if (status != 0) { + if (status == -NFS4ERR_BADNAME && + !(o_arg->open_flags & O_CREAT)) + return -ENOENT; return status; + } if (o_arg->open_flags & O_CREAT) { update_changeattr(dir, &o_res->cinfo); @@ -2455,6 +2461,8 @@ static int nfs4_proc_lookup(struct rpc_clnt *clnt, struct inode *dir, struct qst status = _nfs4_proc_lookup(clnt, dir, name, fhandle, fattr); switch (status) { + case -NFS4ERR_BADNAME: + return -ENOENT; case -NFS4ERR_MOVED: err = nfs4_get_referral(dir, name, fattr, fhandle); break;