diff options
author | Jingbo Xu <jefflexu@linux.alibaba.com> | 2023-02-09 14:39:11 +0800 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2023-02-15 08:11:27 +0800 |
commit | 2dfb8c3b122fad4504a92c34ba68f2fe4444b3f6 (patch) | |
tree | e0c8fc9a81db921fcdbaa2445546ae786c92ccc7 /fs/erofs/internal.h | |
parent | bdfa90142eb1f1272d2efc00dda6c0f35814e36a (diff) |
erofs: maintain cookies of share domain in self-contained list
We'd better not touch sb->s_inodes list and inode->i_count directly.
Let's maintain cookies of share domain in a self-contained list in erofs.
Besides, relinquish cookie with the mutex held. Otherwise if a cookie
is registered when the old cookie with the same name in the same domain
has been removed from the list but not relinquished yet, fscache may
complain "Duplicate cookie detected".
Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Jia Zhu <zhujia.zj@bytedance.com>
Link: https://lore.kernel.org/r/20230209063913.46341-3-jefflexu@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/internal.h')
-rw-r--r-- | fs/erofs/internal.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h index 8a6ae820cd6d..4c190b1b9a9e 100644 --- a/fs/erofs/internal.h +++ b/fs/erofs/internal.h @@ -109,7 +109,11 @@ struct erofs_fscache { struct fscache_cookie *cookie; struct inode *inode; struct inode *anon_inode; + + /* used for share domain mode */ struct erofs_domain *domain; + struct list_head node; + refcount_t ref; char *name; }; |