From 63bab0651be0ba857200219a08644e6a99f448b6 Mon Sep 17 00:00:00 2001 From: Ross Lagerwall Date: Sat, 9 Aug 2014 14:44:00 +0100 Subject: [PATCH] nfsd3: Check write permission after checking existence When creating a file that already exists in a read-only directory with O_EXCL, the NFSv3 server returns EACCES rather than EEXIST (which local files and the NFSv4 server return). Fix this by checking the MAY_CREATE permission only if the file does not exist. Since this already happens in do_nfsd_create, the check in nfsd3_proc_create can simply be removed. Signed-off-by: Ross Lagerwall Signed-off-by: J. Bruce Fields --- Reading git-format-patch failed