Commit 3b60984
committed
NFSD: Return NFS4ERR_FILE_OPEN only when renaming over an open file
RFC 8881 Section 18.26.4 paragraphs 1 - 3 tell us that RENAME should
return NFS4ERR_FILE_OPEN only when the target object is a file that
is currently open. If the target is a directory, some other status
must be returned.
Generally I expect that a delegation recall will be triggered in
some of these circumstances. In other cases, the VFS might return
-EBUSY for other reasons, and NFSD has to ensure that errno does
not leak to clients as a status code that is not permitted by spec.
There are some error flows where the target dentry hasn't been
found yet. The default value for @type therefore is S_IFDIR to return
an alternate status code in those cases.
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>1 parent 370345b commit 3b60984
1 file changed
+29
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1794 | 1794 | | |
1795 | 1795 | | |
1796 | 1796 | | |
1797 | | - | |
1798 | | - | |
1799 | | - | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
1800 | 1810 | | |
1801 | 1811 | | |
1802 | 1812 | | |
1803 | 1813 | | |
1804 | 1814 | | |
1805 | 1815 | | |
1806 | 1816 | | |
| 1817 | + | |
1807 | 1818 | | |
1808 | 1819 | | |
1809 | 1820 | | |
| |||
1861 | 1872 | | |
1862 | 1873 | | |
1863 | 1874 | | |
| 1875 | + | |
1864 | 1876 | | |
1865 | 1877 | | |
1866 | 1878 | | |
1867 | 1879 | | |
1868 | 1880 | | |
| 1881 | + | |
| 1882 | + | |
1869 | 1883 | | |
1870 | 1884 | | |
1871 | 1885 | | |
| |||
1903 | 1917 | | |
1904 | 1918 | | |
1905 | 1919 | | |
1906 | | - | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
1907 | 1932 | | |
1908 | 1933 | | |
1909 | 1934 | | |
| |||
0 commit comments