From: Theodore Ts'o Date: Mon, 24 Mar 2014 18:43:12 +0000 (-0400) Subject: ext4: atomically set inode->i_flags in ext4_set_inode_flags() X-Git-Tag: v3.15-rc1~91^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f16f3225b06242a9ee876f07c1c9b6ed36a22b6;p=pandora-kernel.git ext4: atomically set inode->i_flags in ext4_set_inode_flags() Use cmpxchg() to atomically set i_flags instead of clearing out the S_IMMUTABLE, S_APPEND, etc. flags and then setting them from the EXT4_IMMUTABLE_FL, EXT4_APPEND_FL flags, since this opens up a race where an immutable file has the immutable flag cleared for a brief window of time. Reported-by: John Sullivan Signed-off-by: "Theodore Ts'o" Cc: stable@kernel.org --- Reading git-diff-tree failed