The patch titled Subject: zsmalloc: Delete an unnecessary check before the function call "iput" has been added to the -mm tree. Its filename is zsmalloc-delete-an-unnecessary-check-before-the-function-call-iput.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/zsmalloc-delete-an-unnecessary-check-before-the-function-call-iput.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/zsmalloc-delete-an-unnecessary-check-before-the-function-call-iput.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> Subject: zsmalloc: Delete an unnecessary check before the function call "iput" iput() tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Link: http://lkml.kernel.org/r/559cf499-4a01-25f9-c87f-24d906626a57@xxxxxxxxxxxxxxxxxxxxx Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx> Acked-by: Minchan Kim <minchan@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/zsmalloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -puN mm/zsmalloc.c~zsmalloc-delete-an-unnecessary-check-before-the-function-call-iput mm/zsmalloc.c --- a/mm/zsmalloc.c~zsmalloc-delete-an-unnecessary-check-before-the-function-call-iput +++ a/mm/zsmalloc.c @@ -2181,8 +2181,7 @@ static int zs_register_migration(struct static void zs_unregister_migration(struct zs_pool *pool) { flush_work(&pool->free_work); - if (pool->inode) - iput(pool->inode); + iput(pool->inode); } /* _ Patches currently in -mm which might be from elfring@xxxxxxxxxxxxxxxxxxxxx are zsmalloc-delete-an-unnecessary-check-before-the-function-call-iput.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html