diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2016-01-21 19:40:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-21 20:20:51 -0500 |
commit | ff7d080e528d8faf5bc175fd9909889af03e1566 (patch) | |
tree | 19acc35320f42bab238da12f98ce2b603adccff4 | |
parent | c2594bc37f4464bc74f2c119eb3269a643400aa0 (diff) |
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 <sudip@vectorindia.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/reiserfs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 05db7473bcb5..c0306ec8ed7b 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -288,7 +288,7 @@ static int finish_unfinished(struct super_block *s) | |||
288 | pathrelse(&path); | 288 | pathrelse(&path); |
289 | 289 | ||
290 | inode = reiserfs_iget(s, &obj_key); | 290 | inode = reiserfs_iget(s, &obj_key); |
291 | if (!inode) { | 291 | if (IS_ERR_OR_NULL(inode)) { |
292 | /* | 292 | /* |
293 | * the unlink almost completed, it just did not | 293 | * the unlink almost completed, it just did not |
294 | * manage to remove "save" link and release objectid | 294 | * manage to remove "save" link and release objectid |