• Hugh Dickins's avatar
    generic_file_aio_read() cleanups · 11fa977e
    Hugh Dickins authored
    As akpm points out, there's really no need for generic_file_aio_read to
    make a special case of count 0: just loop through nr_segs doing nothing.
    And as Harvey Harrison points out, there's no need to reset retval to 0
    where it's already 0.
    
    Setting count (or ocount) to 0 before calling generic_segment_checks is
    unnecessary too; but reluctantly I'll leave that removal to someone with a
    wider range of gcc versions to hand - 4.1.2 and 4.2.1 don't warn about it,
    but perhaps others do - I forget which are the warniest versions.
    Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
    Tested-by: default avatarLawrence Greenfield <leg@google.com>
    Cc: Christoph Rohland <hans-christoph.rohland@sap.com>
    Cc: Badari Pulavarty <pbadari@us.ibm.com>
    Cc: Zach Brown <zach.brown@oracle.com>
    Cc: Nick Piggin <nickpiggin@yahoo.com.au>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    11fa977e
filemap.c 68.2 KB