mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
fuse: don't unhash root
[ Upstream commitb1fe686a76
] The root inode is assumed to be always hashed. Do not unhash the root inode even if it is marked BAD. Fixes:5d069dbe8a
("fuse: fix bad inode") Cc: <stable@vger.kernel.org> # v5.11 Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
970e8c49f2
commit
371f27c2c8
@ -923,7 +923,6 @@ static inline bool fuse_stale_inode(const struct inode *inode, int generation,
|
||||
|
||||
static inline void fuse_make_bad(struct inode *inode)
|
||||
{
|
||||
remove_inode_hash(inode);
|
||||
set_bit(FUSE_I_BAD, &get_fuse_inode(inode)->state);
|
||||
}
|
||||
|
||||
|
@ -445,8 +445,11 @@ retry:
|
||||
} else if (fuse_stale_inode(inode, generation, attr)) {
|
||||
/* nodeid was reused, any I/O on the old inode should fail */
|
||||
fuse_make_bad(inode);
|
||||
iput(inode);
|
||||
goto retry;
|
||||
if (inode != d_inode(sb->s_root)) {
|
||||
remove_inode_hash(inode);
|
||||
iput(inode);
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
fi = get_fuse_inode(inode);
|
||||
spin_lock(&fi->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user