aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index b0c01b23422d..ba0da50865fe 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1593,8 +1593,14 @@ static int _nfs4_proc_open(struct nfs4_opendata *data)
1593 int status; 1593 int status;
1594 1594
1595 status = nfs4_run_open_task(data, 0); 1595 status = nfs4_run_open_task(data, 0);
1596 if (status != 0 || !data->rpc_done) 1596 if (!data->rpc_done)
1597 return status;
1598 if (status != 0) {
1599 if (status == -NFS4ERR_BADNAME &&
1600 !(o_arg->open_flags & O_CREAT))
1601 return -ENOENT;
1597 return status; 1602 return status;
1603 }
1598 1604
1599 if (o_arg->open_flags & O_CREAT) { 1605 if (o_arg->open_flags & O_CREAT) {
1600 update_changeattr(dir, &o_res->cinfo); 1606 update_changeattr(dir, &o_res->cinfo);
@@ -2455,6 +2461,8 @@ static int nfs4_proc_lookup(struct rpc_clnt *clnt, struct inode *dir, struct qst
2455 2461
2456 status = _nfs4_proc_lookup(clnt, dir, name, fhandle, fattr); 2462 status = _nfs4_proc_lookup(clnt, dir, name, fhandle, fattr);
2457 switch (status) { 2463 switch (status) {
2464 case -NFS4ERR_BADNAME:
2465 return -ENOENT;
2458 case -NFS4ERR_MOVED: 2466 case -NFS4ERR_MOVED:
2459 err = nfs4_get_referral(dir, name, fattr, fhandle); 2467 err = nfs4_get_referral(dir, name, fattr, fhandle);
2460 break; 2468 break;