[Ocfs2-devel] Ocfs2/move_extents: move/defrag extents within a certain range.

Dan Carpenter dan.carpenter at oracle.com
Wed Feb 15 12:31:59 PST 2012


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




More information about the Ocfs2-devel mailing list