linux-stable/fs/afs
David Howells b5d50c6a60 afs: Fix file locking on R/O volumes to operate in local mode
[ Upstream commit b590eb41be ]

AFS doesn't really do locking on R/O volumes as fileservers don't maintain
state with each other and thus a lock on a R/O volume file on one
fileserver will not be be visible to someone looking at the same file on
another fileserver.

Further, the server may return an error if you try it.

Fix this by doing what other AFS clients do and handle filelocking on R/O
volume files entirely within the client and don't touch the server.

Fixes: 6c6c1d63c2 ("afs: Provide mount-time configurable byte-range file locking emulation")
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-03 07:31:22 +01:00
..
addr_list.c
afs.h
afs_cm.h
afs_fs.h
afs_vl.h
cache.c
callback.c
cell.c
cmservice.c
dir.c afs: Fix setting of mtime when creating a file/dir/symlink 2023-06-14 11:13:00 +02:00
dir_edit.c
dir_silly.c
dynroot.c afs: Make error on cell lookup failure consistent with OpenAFS 2023-12-03 07:31:21 +01:00
file.c
flock.c afs: Use the operation issue time instead of the reply time for callbacks 2022-09-15 11:30:05 +02:00
fs_operation.c
fs_probe.c afs: Fix lost servers_outstanding count 2022-12-31 13:14:45 +01:00
fsclient.c afs: Use the operation issue time instead of the reply time for callbacks 2022-09-15 11:30:05 +02:00
inode.c afs: Fix updating of i_size with dv jump from server 2023-05-11 23:00:38 +09:00
internal.h afs: Fix afs_server_list to be cleaned up with RCU 2023-12-03 07:31:21 +01:00
Kconfig
main.c
Makefile
misc.c afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked 2022-09-23 14:15:51 +02:00
mntpt.c
proc.c
protocol_afs.h
protocol_uae.h
protocol_yfs.h
rotate.c afs: Adjust ACK interpretation to try and cope with NAT 2022-06-09 10:22:40 +02:00
rxrpc.c afs: Use the operation issue time instead of the reply time for callbacks 2022-09-15 11:30:05 +02:00
security.c
server.c
server_list.c afs: Fix afs_server_list to be cleaned up with RCU 2023-12-03 07:31:21 +01:00
super.c afs: Fix file locking on R/O volumes to operate in local mode 2023-12-03 07:31:22 +01:00
vl_alias.c
vl_list.c
vl_probe.c afs: Fix vlserver probe RTT handling 2023-06-21 15:59:18 +02:00
vl_rotate.c afs: Return ENOENT if no cell DNS record can be found 2023-12-03 07:31:22 +01:00
vlclient.c
volume.c
write.c afs: Adjust ACK interpretation to try and cope with NAT 2022-06-09 10:22:40 +02:00
xattr.c
xdr_fs.h
yfsclient.c afs: Use the operation issue time instead of the reply time for callbacks 2022-09-15 11:30:05 +02:00