• Al Viro's avatar
    ocfs2: move generic_write_checks() before the alignment checks · 90320251
    Al Viro authored
    	Alignment checks for dio depend upon the range truncation done by
    generic_write_checks().  They can be done as soon as we got ocfs2_rw_lock()
    and that actually makes ocfs2_prepare_inode_for_write() simpler.
    
    	The only thing to watch out for is restoring the original count
    in "unlock and redo without dio" case.  Position doesn't need to be
    restored, since we change it only in O_APPEND case and in that case it
    will be reassigned anyway.
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    90320251
file.c 66.6 KB