]> git.ipfire.org Git - thirdparty/linux.git/commit
coda: change locking order in coda_file_write_iter()
authorAmir Goldstein <amir73il@gmail.com>
Wed, 22 Nov 2023 12:27:08 +0000 (14:27 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 24 Nov 2023 08:22:28 +0000 (09:22 +0100)
commite389b76a7ee1b62392ab52c22f9ba81f23145824
tree613fced889982825013473b29d2a7c011cc2b6ce
parent2f4d8ad82511a336f8a805e3759c5189a25bb286
coda: change locking order in coda_file_write_iter()

The coda host file is a backing file for the coda inode on a different
filesystem than the coda inode.

Change the locking order to take the coda inode lock before taking
the backing host file freeze protection, same as in ovl_write_iter()
and in network filesystems that use cachefiles.

Link: https://lore.kernel.org/r/CAOQ4uxjcnwuF1gMxe64WLODGA_MyAy8x-DtqkCUxqVQKk3Xbng@mail.gmail.com/
Acked-by: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/r/20231122122715.2561213-10-amir73il@gmail.com
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/coda/file.c