projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4441686
)
dm bufio: Remove NULL check of list_entry()
author
Yuesong Li
<liyuesong@vivo.com>
Thu, 22 Aug 2024 02:14:00 +0000
(10:14 +0800)
committer
Mikulas Patocka
<mpatocka@redhat.com>
Thu, 22 Aug 2024 16:32:55 +0000
(18:32 +0200)
list_entry() will never return a NULL pointer, thus remove the
check.
Signed-off-by: Yuesong Li <liyuesong@vivo.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-bufio.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/md/dm-bufio.c
b/drivers/md/dm-bufio.c
index 098bf526136c942508b4e6bf302ad4cc5c5c1399..d478aafa02c97fc5b3c0cfea207a9947debbb0c8 100644
(file)
--- a/
drivers/md/dm-bufio.c
+++ b/
drivers/md/dm-bufio.c
@@
-529,9
+529,6
@@
static struct dm_buffer *list_to_buffer(struct list_head *l)
{
struct lru_entry *le = list_entry(l, struct lru_entry, list);
- if (!le)
- return NULL;
-
return le_to_buffer(le);
}