mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-08 18:35:20 +02:00
btrfs: send: handle unexpected inode in header process_recorded_refs()
[ Upstream commit 5d2288711c
]
Change BUG_ON to proper error handling when an unexpected inode number
is encountered. As the comment says this should never happen.
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
4eb8be942e
commit
48256173f2
|
@ -4195,7 +4195,13 @@ static int process_recorded_refs(struct send_ctx *sctx, int *pending_move)
|
||||||
* This should never happen as the root dir always has the same ref
|
* This should never happen as the root dir always has the same ref
|
||||||
* which is always '..'
|
* which is always '..'
|
||||||
*/
|
*/
|
||||||
BUG_ON(sctx->cur_ino <= BTRFS_FIRST_FREE_OBJECTID);
|
if (unlikely(sctx->cur_ino <= BTRFS_FIRST_FREE_OBJECTID)) {
|
||||||
|
btrfs_err(fs_info,
|
||||||
|
"send: unexpected inode %llu in process_recorded_refs()",
|
||||||
|
sctx->cur_ino);
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
valid_path = fs_path_alloc();
|
valid_path = fs_path_alloc();
|
||||||
if (!valid_path) {
|
if (!valid_path) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user