]> git.baikalelectronics.ru Git - kernel.git/commit
coda: avoid doing bad things on inode type changes during revalidation
authorJan Harkes <jaharkes@cs.cmu.edu>
Tue, 9 Nov 2021 02:34:45 +0000 (18:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Nov 2021 18:02:51 +0000 (10:02 -0800)
commit6596a0b5fe8cfe284b451d833951b38537712267
tree5ac8b96ef6e760b86907e1369f503f6e7134a441
parentc41fdb9a8ca456019a7ebb3eb0992fac2acd2ed4
coda: avoid doing bad things on inode type changes during revalidation

When Coda discovers an inconsistent object, it turns it into a symlink.
However we can't just follow this change in the kernel on an existing file
or directory inode that may still have references.

This patch removes the inconsistent inode from the inode hash and
allocates a new inode for the symlink object.

Link: https://lkml.kernel.org/r/20210908140308.18491-7-jaharkes@cs.cmu.edu
Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
Cc: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Jing Yangyang <jing.yangyang@zte.com.cn>
Cc: Xin Tan <tanxin.ctf@gmail.com>
Cc: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Cc: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/coda/cnode.c
fs/coda/coda_linux.c
fs/coda/coda_linux.h