]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: remove while loop in mpage_map_and_submit_extent()
authorTheodore Ts'o <tytso@mit.edu>
Mon, 17 Jun 2013 13:56:00 +0000 (09:56 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 17 Jun 2013 13:56:00 +0000 (09:56 -0400)
commit5ee8dd41427034dedf11bbcc89b4b086695b8466
tree2a6733cfb95a92b59889abec53f46c504f5ccdcf
parent07c264117bbbb4e70b268f942b48576db6488642
ext4: remove while loop in mpage_map_and_submit_extent()

The while loop in mpage_map_and_submit_extent() is pointless; this
function is only called if mpd.map.m_len is non-zero, and at the end
of the while loop, mpage_map_and_submit_buffers sets mpd.map.m_len to
be zero on success.  (And on a failure, we return out of the while
loop anyway.)

Hence, the body of the while loop is guaranteed to execute once and
exactly once.  This also fixes a gcc warning complaining that err
might be left uninitialized.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>
fs/ext4/inode.c