Skip to content

Commit

Permalink
ext2: check err when partial != NULL
Browse files Browse the repository at this point in the history
Check err when partial == NULL is meaningless because
partial == NULL means getting branch successfully without
error.

CC: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Chengguang Xu <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
cgxu519 authored and jankara committed Nov 5, 2019
1 parent df4bb5d commit e705f4b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/ext2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,10 +701,13 @@ static int ext2_get_blocks(struct inode *inode,
if (!partial) {
count++;
mutex_unlock(&ei->truncate_mutex);
if (err)
goto cleanup;
goto got_it;
}

if (err) {
mutex_unlock(&ei->truncate_mutex);
goto cleanup;
}
}

/*
Expand Down

0 comments on commit e705f4b

Please sign in to comment.