Skip to content
Commit 90320251 authored by Al Viro's avatar Al Viro
Browse files

ocfs2: move generic_write_checks() before the alignment checks



	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>
parent 5dc3161c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment