J. Bruce Fields 9dc4e6c4d1 nfsd: don't fail unchecked creates of non-special files
Allow a v3 unchecked open of a non-regular file succeed as if it were a
lookup; typically a client in such a case will want to fall back on a
local open, so succeeding and giving it the filehandle is more useful
than failing with nfserr_exist, which makes it appear that nothing at
all exists by that name.

Similarly for v4, on an open-create, return the same errors we would on
an attempt to open a non-regular file, instead of returning
nfserr_exist.

This fixes a problem found doing a v4 open of a symlink with
O_RDONLY|O_CREAT, which resulted in the current client returning EEXIST.

Thanks also to Trond for analysis.

Cc: stable@kernel.org
Reported-by: Orion Poplawski <orion@cora.nwra.com>
Tested-by: Orion Poplawski <orion@cora.nwra.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2012-04-11 17:49:52 -04:00
..
2012-03-28 09:58:38 -07:00
2012-04-03 20:46:09 -05:00
2012-03-31 16:03:16 -04:00
2012-03-21 10:15:51 -07:00
2012-03-28 15:58:21 -07:00
2012-03-30 17:31:56 -07:00
2012-03-28 19:02:35 -07:00
2011-03-31 11:26:23 -03:00
2012-03-20 21:29:52 -04:00
2012-03-20 21:29:38 -04:00
2012-03-30 17:31:56 -07:00
2012-03-23 09:27:40 -07:00
2012-03-28 15:58:21 -07:00
2012-03-20 21:29:46 -04:00
2012-03-20 21:29:46 -04:00
2012-01-03 22:52:39 -05:00
2012-03-28 10:07:27 -07:00
2012-03-20 21:29:51 -04:00
2012-04-05 15:25:50 -07:00
2012-03-20 21:29:38 -04:00