diff options
author | Gao Xiang <hsiangkao@redhat.com> | 2020-10-13 16:52:04 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-10-13 18:38:29 -0700 |
commit | 3264631548b1f2bf89b71793d06bfd0f748f649d (patch) | |
tree | 7fb64469bd73774bc342774aac6c542c56acd602 /mm/swapfile.c | |
parent | 146608bb75e6776af4cf42310f583d39311e5334 (diff) | |
download | linux-3264631548b1f2bf89b71793d06bfd0f748f649d.tar.gz linux-3264631548b1f2bf89b71793d06bfd0f748f649d.tar.bz2 linux-3264631548b1f2bf89b71793d06bfd0f748f649d.zip |
swap: rename SWP_FS to SWAP_FS_OPS to avoid ambiguity
SWP_FS is used to make swap_{read,write}page() go through the filesystem,
and it's only used for swap files over NFS for now. Otherwise it will
directly submit IO to blockdev according to swapfile extents reported by
filesystems in advance.
As Matthew pointed out [1], SWP_FS naming is somewhat confusing, so let's
rename to SWP_FS_OPS.
[1] https://lore.kernel.org/r/20200820113448.GM17456@casper.infradead.org
Suggested-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Link: https://lkml.kernel.org/r/20200822113019.11319-1-hsiangkao@redhat.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index ced4635d924c..183b87bc87cc 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -2437,7 +2437,7 @@ static int setup_swap_extents(struct swap_info_struct *sis, sector_t *span) if (ret >= 0) sis->flags |= SWP_ACTIVATED; if (!ret) { - sis->flags |= SWP_FS; + sis->flags |= SWP_FS_OPS; ret = add_swap_extent(sis, 0, sis->max, 0); *span = sis->pages; } |