From: NeilBrown <neilb@cse.unsw.edu.au>

Exclusive creates were failing with permission errors, because they don't set
the mode on the newly created file, and the permission check in fh_verify
(called at the end of do_open_lookup) was failing.  So pass in the
MAY_OWNER_OVERRIDE flag to allow the owner of the file to override the
permission check.  


---

 25-akpm/fs/nfsd/nfs4proc.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN fs/nfsd/nfs4proc.c~knfsd-v4-exclusive-open-fix fs/nfsd/nfs4proc.c
--- 25/fs/nfsd/nfs4proc.c~knfsd-v4-exclusive-open-fix	Mon Feb 23 16:33:44 2004
+++ 25-akpm/fs/nfsd/nfs4proc.c	Mon Feb 23 16:33:44 2004
@@ -95,6 +95,7 @@ do_open_lookup(struct svc_rqst *rqstp, s
 			accmode = MAY_READ;
 		if (open->op_share_deny & NFS4_SHARE_ACCESS_WRITE)
 			accmode |= (MAY_WRITE | MAY_TRUNC);
+		accmode |= MAY_OWNER_OVERRIDE;
 		status = fh_verify(rqstp, current_fh, S_IFREG, accmode);
 	}
 

_