Skip to contentSkip to conversation

Ocfs2/move_extents: move/defrag extents within a certain range.

Ocfs2-devel Dan Carpenter 1 participant 2 messages Feb 15, 2012 OCFS2

lore
Share & tools
lore
#0 lore raw

Hello Tristan Ye,

This is a semi-automatic email about new static checker warnings.

The patch 53069d4e7695: "Ocfs2/move_extents: move/defrag extents within a certain range." from May 25, 2011, leads to the following Smatch complaint:

fs/ocfs2/move_extents.c:980 ocfs2_move_extents()
warn: variable dereferenced before check 'inode' (see line 978)

fs/ocfs2/move_extents.c
977 struct buffer_head *di_bh = NULL;

   978		struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
                                                   ^^^^^^^^^^^

Dereference.

979
980 if (!inode)

                    ^^^^^^

Check.

981 return -ENOENT;
982

regards,
dan carpenter