From: Miao Xie Date: Thu, 20 Feb 2014 10:08:51 +0000 (+0800) Subject: Btrfs: use ACCESS_ONCE to prevent the optimize accesses to ->last_trans_log_full_commit X-Git-Tag: v3.15-rc1~96^2~78 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c902ba6223f6a6575054226931fafc51314a25f;p=pandora-kernel.git Btrfs: use ACCESS_ONCE to prevent the optimize accesses to ->last_trans_log_full_commit ->last_trans_log_full_commit may be changed by the other tasks without lock, so we need prevent the compiler from the optimize access just like tmp = fs_info->last_trans_log_full_commit if (tmp == ...) ... if (tmp == ...) ... In fact, we need get the new value of ->last_trans_log_full_commit during the second access. Fix it by ACCESS_ONCE(). Signed-off-by: Miao Xie Signed-off-by: Josef Bacik --- Reading git-diff-tree failed