From: Dan Carpenter Date: Wed, 10 Dec 2014 23:42:04 +0000 (-0800) Subject: ocfs2: remove bogus NULL check in ocfs2_move_extents() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=88d69b92fc12084af43cba428bda9727c0ca084f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ocfs2: remove bogus NULL check in ocfs2_move_extents() "inode" isn't NULL here, and also we dereference it on the previous line so static checkers get annoyed. Signed-off-by: Dan Carpenter Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c index 74caffeeee1d..56a768d06aa6 100644 --- a/fs/ocfs2/move_extents.c +++ b/fs/ocfs2/move_extents.c @@ -904,9 +904,6 @@ static int ocfs2_move_extents(struct ocfs2_move_extents_context *context) struct buffer_head *di_bh = NULL; struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); - if (!inode) - return -ENOENT; - if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb)) return -EROFS;