From: Yingtai Xie Date: Wed, 6 Aug 2014 23:03:54 +0000 (-0700) Subject: ocfs2: correctly check the return value of ocfs2_search_extent_list X-Git-Tag: cleanup-for-v3.18~96^2~210 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=981035b47d7da8ba7c153ed431bf515f593853d8;p=pandora-kernel.git ocfs2: correctly check the return value of ocfs2_search_extent_list ocfs2_search_extent_list may return -1, so we should check the return value in ocfs2_split_and_insert, otherwise it may cause array index out of bound. And ocfs2_search_extent_list can only return value less than el->l_next_free_rec, so check if it is equal or larger than le16_to_cpu(el->l_next_free_rec) is meaningless. Signed-off-by: Yingtai Xie Signed-off-by: Joseph Qi Cc: Joel Becker Cc: Mark Fasheh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed