From: Al Viro Date: Thu, 3 Apr 2014 14:27:17 +0000 (-0400) Subject: cifs: fix the race in cifs_writev() X-Git-Tag: v3.15-rc1~16^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19dfc1f5f2ef03a52aa30c8257c5745edef23f55;p=pandora-kernel.git cifs: fix the race in cifs_writev() O_APPEND handling there hadn't been completely fixed by Pavel's patch; it checks the right value, but it's racy - we can't really do that until i_mutex has been taken. Fix by switching to __generic_file_aio_write() (open-coding generic_file_aio_write(), actually) and pulling mutex_lock() above inode_size_read(). Cc: stable@vger.kernel.org Signed-off-by: Al Viro --- Reading git-diff-tree failed