projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
903889f
)
Btrfs: fix error handling in delete_block_group_cache()
author
Tsutomu Itoh
<t-itoh@jp.fujitsu.com>
Thu, 6 Sep 2012 09:08:59 +0000
(
03:08
-0600)
committer
Chris Mason
<chris.mason@fusionio.com>
Mon, 1 Oct 2012 19:19:14 +0000
(15:19 -0400)
btrfs_iget() never return NULL.
So, NULL check is unnecessary.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
fs/btrfs/relocation.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/relocation.c
b/fs/btrfs/relocation.c
index 5a15c96a18ff4d6f75b3317bebc170b2fcef0e5f..7e7fd1bcfc5414504f4357bbafe32f7846ec2789 100644
(file)
--- a/
fs/btrfs/relocation.c
+++ b/
fs/btrfs/relocation.c
@@
-3270,8
+3270,8
@@
static int delete_block_group_cache(struct btrfs_fs_info *fs_info,
key.offset = 0;
inode = btrfs_iget(fs_info->sb, &key, root, NULL);
- if (IS_ERR
_OR_NULL
(inode) || is_bad_inode(inode)) {
- if (
inode &&
!IS_ERR(inode))
+ if (IS_ERR(inode) || is_bad_inode(inode)) {
+ if (!IS_ERR(inode))
iput(inode);
return -ENOENT;
}