]> git.itanic.dy.fi Git - linux-stable/commit
afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked
authorDavid Howells <dhowells@redhat.com>
Tue, 6 Sep 2022 21:09:11 +0000 (22:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2022 12:17:00 +0000 (14:17 +0200)
commit72602bc62013fa1a41dc931aeed34e78c63fd2e7
treeb8022c15bc6b17bbbdeb223909f4b0a7b0451117
parent517a0324db6e639f4f558249268fa23371ec9a8d
afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked

[ Upstream commit 0066f1b0e27556381402db3ff31f85d2a2265858 ]

When trying to get a file lock on an AFS file, the server may return
UAEAGAIN to indicate that the lock is already held.  This is currently
translated by the default path to -EREMOTEIO.

Translate it instead to -EAGAIN so that we know we can retry it.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeffrey E Altman <jaltman@auristor.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Link: https://lore.kernel.org/r/166075761334.3533338.2591992675160918098.stgit@warthog.procyon.org.uk/
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/afs/misc.c