diff mbox series

[09/15] mm/swapfile.c: fix a comment in sys_swapon()

Message ID 20200221040415.SrM1B%akpm@linux-foundation.org (mailing list archive)
State New, archived
Headers show
Series [01/15] y2038: remove ktime to/from timespec/timeval conversion | expand

Commit Message

Andrew Morton Feb. 21, 2020, 4:04 a.m. UTC
From: Christoph Hellwig <hch@lst.de>
Subject: 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>
---

 mm/swapfile.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

--- a/mm/swapfile.c~mm-fix-a-comment-in-sys_swapon
+++ a/mm/swapfile.c
@@ -3157,7 +3157,7 @@  SYSCALL_DEFINE2(swapon, const char __use
 	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;