]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
afs: Fix EEXIST error returned from afs_rmdir() to be ENOTEMPTY
authorDavid Howells <dhowells@redhat.com>
Mon, 16 Dec 2024 20:41:02 +0000 (20:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:49:49 +0000 (12:49 +0100)
commitef5f2706364d0ed08a686ba3a0e6b2bb3a39c4af
treea54540dd11dcb9eae7f748a43c440ba7770fac33
parentc16c81c81336c0912eb3542194f16215c0a40037
afs: Fix EEXIST error returned from afs_rmdir() to be ENOTEMPTY

[ Upstream commit b49194da2aff2c879dec9c59ef8dec0f2b0809ef ]

AFS servers pass back a code indicating EEXIST when they're asked to remove
a directory that is not empty rather than ENOTEMPTY because not all the
systems that an AFS server can run on have the latter error available and
AFS preexisted the addition of that error in general.

Fix afs_rmdir() to translate EEXIST to ENOTEMPTY.

Fixes: 260a980317da ("[AFS]: Add "directory write" support.")
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20241216204124.3752367-13-dhowells@redhat.com
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/afs/dir.c