mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-03 17:30:23 -05:00
reiserfs: fix dereference of ERR_PTR
reiserfs_iget() returns either NULL or error code in ERR_PTR. And we were only checking for NULL, so in case of some other error we will try to dereference the ERR_PTR(-errno) thinking it to be a valid pointer. Signed-off-by: Sudip Mukherjee <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c2594bc37f
commit
ff7d080e52
1 changed files with 1 additions and 1 deletions
|
|
@ -288,7 +288,7 @@ static int finish_unfinished(struct super_block *s)
|
|||
pathrelse(&path);
|
||||
|
||||
inode = reiserfs_iget(s, &obj_key);
|
||||
if (!inode) {
|
||||
if (IS_ERR_OR_NULL(inode)) {
|
||||
/*
|
||||
* the unlink almost completed, it just did not
|
||||
* manage to remove "save" link and release objectid
|
||||
|
|
|
|||
Loading…
Reference in a new issue