--- a/mm/shmem.c~mm-shmem-use-helper-macro-__attr_rw +++ a/mm/shmem.c @@ -3965,8 +3965,7 @@ static ssize_t shmem_enabled_store(struc return count; } -struct kobj_attribute shmem_enabled_attr = - __ATTR(shmem_enabled, 0644, shmem_enabled_show, shmem_enabled_store); +struct kobj_attribute shmem_enabled_attr = __ATTR_RW(shmem_enabled); #endif /* CONFIG_TRANSPARENT_HUGEPAGE && CONFIG_SYSFS */ #else /* !CONFIG_SHMEM */