summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/futex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index 16dbe4c93895..f50b434756c1 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -670,13 +670,14 @@ again:
670 * this reference was taken by ihold under the page lock 670 * this reference was taken by ihold under the page lock
671 * pinning the inode in place so i_lock was unnecessary. The 671 * pinning the inode in place so i_lock was unnecessary. The
672 * only way for this check to fail is if the inode was 672 * only way for this check to fail is if the inode was
673 * truncated in parallel so warn for now if this happens. 673 * truncated in parallel which is almost certainly an
674 * application bug. In such a case, just retry.
674 * 675 *
675 * We are not calling into get_futex_key_refs() in file-backed 676 * We are not calling into get_futex_key_refs() in file-backed
676 * cases, therefore a successful atomic_inc return below will 677 * cases, therefore a successful atomic_inc return below will
677 * guarantee that get_futex_key() will still imply smp_mb(); (B). 678 * guarantee that get_futex_key() will still imply smp_mb(); (B).
678 */ 679 */
679 if (WARN_ON_ONCE(!atomic_inc_not_zero(&inode->i_count))) { 680 if (!atomic_inc_not_zero(&inode->i_count)) {
680 rcu_read_unlock(); 681 rcu_read_unlock();
681 put_page(page); 682 put_page(page);
682 683