xfs: Fix bug in xfs_dir2_leaf_find_entry() function
This patch fixes this error:
fs/xfs/xfs.c: In function ‘xfs_iget’:
fs/xfs/xfs.c:685:8: error: ‘hash’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
fs/xfs/xfs.c:646:14: note: ‘hash’ was declared here
fs/xfs/xfs.c:811:22: error: ‘mid’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
Since hash variable wasn't set to any value by default in
xfs_dir2_leaf_find_entry() function and hashwant would return 0 in a
default case, then the check "if (hash != hashwant)" never would become
true. The same would occur with mid variable and an identical fix has
been provided on this patch.
Also, this patch cleanups the previous commit by removing trailing
whitespaces and moves xfs_da_hashname() and fill_xfs_inode_pvt()
functions to a more readable place.
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>