diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2022-05-19 23:08:50 +0200 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-05-19 23:08:50 +0200 |
commit | 6106b93efad1ea14d428558c2e4efc5f76874c23 (patch) | |
tree | bd9d3df34e32b5ccfc61b597e64247bcfb932fe4 /mm/swap_state.c | |
parent | mm/swap: use helper is_swap_pte() in swap_vma_readahead (diff) | |
download | linux-6106b93efad1ea14d428558c2e4efc5f76874c23.tar.xz linux-6106b93efad1ea14d428558c2e4efc5f76874c23.zip |
mm/swap: use helper macro __ATTR_RW
Use helper macro __ATTR_RW to define vma_ra_enabled_attr to make code more
clear. Minor readability improvement.
Link: https://lkml.kernel.org/r/20220509131416.17553-3-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: NeilBrown <neilb@suse.de>
Cc: Peter Xu <peterx@redhat.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/swap_state.c')
-rw-r--r-- | mm/swap_state.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/swap_state.c b/mm/swap_state.c index 4667fa406b14..b9e4ed2e90bf 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -884,9 +884,7 @@ static ssize_t vma_ra_enabled_store(struct kobject *kobj, return count; } -static struct kobj_attribute vma_ra_enabled_attr = - __ATTR(vma_ra_enabled, 0644, vma_ra_enabled_show, - vma_ra_enabled_store); +static struct kobj_attribute vma_ra_enabled_attr = __ATTR_RW(vma_ra_enabled); static struct attribute *swap_attrs[] = { &vma_ra_enabled_attr.attr, |