mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 16:46:23 +08:00
Btrfs: Correct redundant test in add_inode_ref
dir has already been tested. It seems that this test should be on the recently returned value inode. A simplified version of the semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
9779b72f05
commit
631c07c8d1
@ -797,7 +797,7 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans,
|
||||
return -ENOENT;
|
||||
|
||||
inode = read_one_inode(root, key->objectid);
|
||||
BUG_ON(!dir);
|
||||
BUG_ON(!inode);
|
||||
|
||||
ref_ptr = btrfs_item_ptr_offset(eb, slot);
|
||||
ref_end = ref_ptr + btrfs_item_size_nr(eb, slot);
|
||||
|
Loading…
Reference in New Issue
Block a user