aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs3proc.c
diff options
context:
space:
mode:
authorAndy Ryan <genanr@allantgroup.com>2006-11-07 15:36:26 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-06 10:46:26 -0500
commit46b9f8e1484352f09f229107ba2a758fe386d7f7 (patch)
tree544f971bf1034fa34c0d9b5cf2f5aeaabc3d413b /fs/nfs/nfs3proc.c
parent8aca67f0ae2d8811165c22326825a645cc8e1b48 (diff)
NFS Exclusive open not supported bug
When trying to open a file with the O_EXCL flag over NFS on a server that does not support exclusive mode, the file does not open. The reason, rpc_call_sync returns a errno number, and not the nfs error number. I fixed it by changing the status check in nfs3proc.c. Either this is how it should be fixed, or rpc_call_sync should be fixed to return the NFS error. Signed-off-by: Andy Ryan <genanr@allantgroup.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs3proc.c')
-rw-r--r--fs/nfs/nfs3proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
index e5f128ffc32d..9d7ff4f83faf 100644
--- a/fs/nfs/nfs3proc.c
+++ b/fs/nfs/nfs3proc.c
@@ -369,7 +369,7 @@ again:
369 369
370 /* If the server doesn't support the exclusive creation semantics, 370 /* If the server doesn't support the exclusive creation semantics,
371 * try again with simple 'guarded' mode. */ 371 * try again with simple 'guarded' mode. */
372 if (status == NFSERR_NOTSUPP) { 372 if (status == -ENOTSUPP) {
373 switch (arg.createmode) { 373 switch (arg.createmode) {
374 case NFS3_CREATE_EXCLUSIVE: 374 case NFS3_CREATE_EXCLUSIVE:
375 arg.createmode = NFS3_CREATE_GUARDED; 375 arg.createmode = NFS3_CREATE_GUARDED;