Commit a9d4c12
NFSD: Never return NFS4ERR_FILE_OPEN when removing a directory
commit 370345b upstream.
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 <trondmy@hammerspace.com>
Fixes: 466e16f ("nfsd: check for EBUSY from vfs_rmdir/vfs_unink.")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent c2ed21a commit a9d4c12
1 file changed
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1931 | 1931 | | |
1932 | 1932 | | |
1933 | 1933 | | |
1934 | | - | |
1935 | | - | |
1936 | | - | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
1937 | 1945 | | |
1938 | 1946 | | |
1939 | 1947 | | |
| |||
2007 | 2015 | | |
2008 | 2016 | | |
2009 | 2017 | | |
2010 | | - | |
2011 | | - | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
2012 | 2021 | | |
2013 | | - | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
2014 | 2026 | | |
2015 | 2027 | | |
2016 | 2028 | | |
| |||
0 commit comments