From 06f78b9548158069eb1c075ca09cefce50b8286b Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 26 Feb 2004 06:46:20 -0800 Subject: [PATCH] [PATCH] kNFSd: v4 exclusive open fix. From: NeilBrown 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. --- fs/nfsd/nfs4proc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index cc8f6728e4351..c9398a6531e43 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -95,6 +95,7 @@ do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o 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); } -- 2.53.0