From: Theodore Ts'o Date: Mon, 21 Apr 2014 18:37:52 +0000 (-0400) Subject: ext4: fix locking for O_APPEND writes X-Git-Tag: omap-for-v3.16/fixes-against-rc1~45^2~29^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5ccfe1ddbaf9d923a3ebdadcb1e5e32d83e9c28;p=pandora-kernel.git ext4: fix locking for O_APPEND writes Al Viro pointed out that locking for O_APPEND writes was problematic, since the location of the write isn't known until after we take the i_mutex, which impacts the ext4_unaligned_aio() and s_bitmap_maxbytes check. For O_APPEND always assume that the write is unaligned so call ext4_unwritten_wait(). And to solve the second problem, take the i_mutex earlier before we start the s_bitmap_maxbytes check. Signed-off-by: "Theodore Ts'o" --- Reading git-diff-tree failed