Commit 370345b
committed
NFSD: Never return NFS4ERR_FILE_OPEN when removing a directory
RFC 8881 Section 18.25.4 paragraph 5 tells us that the server
should return NFS4ERR_FILE_OPEN only if the target object is an
opened file. This suggests that returning this status when removing
a directory will confuse NFS clients.
This is a version-specific issue; nfsd_proc_remove/rmdir() and
nfsd3_proc_remove/rmdir() already return nfserr_access as
appropriate.
Unfortunately there is no quick way for nfsd4_remove() to determine
whether the target object is a file or not, so the check is done in
in nfsd_unlink() for now.
Reported-by: Trond Myklebust <[email protected]>
Fixes: 466e16f ("nfsd: check for EBUSY from vfs_rmdir/vfs_unink.")
Reviewed-by: Jeff Layton <[email protected]>
Cc: [email protected]
Signed-off-by: Chuck Lever <[email protected]>1 parent d7d8e31 commit 370345b
1 file changed
+18
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1930 | 1930 | | |
1931 | 1931 | | |
1932 | 1932 | | |
1933 | | - | |
1934 | | - | |
1935 | | - | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
1936 | 1944 | | |
1937 | 1945 | | |
1938 | 1946 | | |
| |||
2006 | 2014 | | |
2007 | 2015 | | |
2008 | 2016 | | |
2009 | | - | |
2010 | | - | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
2011 | 2020 | | |
2012 | | - | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
2013 | 2025 | | |
2014 | 2026 | | |
2015 | 2027 | | |
| |||
0 commit comments