drivers/hwmon/hwmon.c: convert idr to ida and use ida_simple_get()
[firefly-linux-kernel-4.4.55.git] / mm / shmem.c
index 2d357729529880b29f18704edda807108f6cdc5b..fa4fa6ce13bc431c65de6725d9b86f6db24bf041 100644 (file)
@@ -1068,6 +1068,12 @@ int shmem_lock(struct file *file, int lock, struct user_struct *user)
                user_shm_unlock(inode->i_size, user);
                info->flags &= ~VM_LOCKED;
                mapping_clear_unevictable(file->f_mapping);
+               /*
+                * Ensure that a racing putback_lru_page() can see
+                * the pages of this mapping are evictable when we
+                * skip them due to !PageLRU during the scan.
+                */
+               smp_mb__after_clear_bit();
                scan_mapping_unevictable_pages(file->f_mapping);
        }
        retval = 0;