diff options
author | Jan Harkes <jaharkes@cs.cmu.edu> | 2021-11-09 03:34:45 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-09 19:02:51 +0100 |
commit | 5a646fb3a3e2de8bbab19d41826b3e54b09969bc (patch) | |
tree | 5ac8b96ef6e760b86907e1369f503f6e7134a441 /fs/coda/coda_linux.h | |
parent | coda: avoid hidden code duplication in rename (diff) | |
download | linux-5a646fb3a3e2de8bbab19d41826b3e54b09969bc.tar.xz linux-5a646fb3a3e2de8bbab19d41826b3e54b09969bc.zip |
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>
Diffstat (limited to 'fs/coda/coda_linux.h')
-rw-r--r-- | fs/coda/coda_linux.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/coda/coda_linux.h b/fs/coda/coda_linux.h index 3c2947bba5e5..9be281bbcc06 100644 --- a/fs/coda/coda_linux.h +++ b/fs/coda/coda_linux.h @@ -53,10 +53,11 @@ int coda_getattr(struct user_namespace *, const struct path *, struct kstat *, u32, unsigned int); int coda_setattr(struct user_namespace *, struct dentry *, struct iattr *); -/* this file: heloers */ +/* this file: helpers */ char *coda_f2s(struct CodaFid *f); int coda_iscontrol(const char *name, size_t length); +umode_t coda_inode_type(struct coda_vattr *attr); void coda_vattr_to_iattr(struct inode *, struct coda_vattr *); void coda_iattr_to_vattr(struct iattr *, struct coda_vattr *); unsigned short coda_flags_to_cflags(unsigned short); |