summaryrefslogtreecommitdiffstats
path: root/mm/swapfile.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-02-20 20:04:15 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2020-02-21 11:22:15 -0800
commitfed98ef4d8b665316479dd35cbd92d3e2ff470a3 (patch)
tree07e493a5bfc0ab14c8d02c796b79152f9cc14043 /mm/swapfile.c
parent0ef82fcefb99300ede6f4d38a8100845b2dc8e30 (diff)
downloadlinux-stable-fed98ef4d8b665316479dd35cbd92d3e2ff470a3.tar.gz
linux-stable-fed98ef4d8b665316479dd35cbd92d3e2ff470a3.tar.bz2
linux-stable-fed98ef4d8b665316479dd35cbd92d3e2ff470a3.zip
mm/swapfile.c: fix a comment in sys_swapon()
claim_swapfile now always takes i_rwsem. Link: http://lkml.kernel.org/r/20200114161225.309792-2-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r--mm/swapfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 2c33ff456ed5..b2a2e45c9a36 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -3157,7 +3157,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
mapping = swap_file->f_mapping;
inode = mapping->host;
- /* If S_ISREG(inode->i_mode) will do inode_lock(inode); */
+ /* will take i_rwsem; */
error = claim_swapfile(p, inode);
if (unlikely(error))
goto bad_swap;