Thread (39 messages) 39 messages, 10 authors, 2020-02-12
STALE2327d

[PATCH 01/12] mm: fix a comment in sys_swapon

From: Christoph Hellwig <hch@lst.de>
Date: 2020-01-14 16:12:35
Also in: linux-fsdevel, linux-mm, linux-xfs, lkml
Subsystem: memory management, memory management - swap, the rest · Maintainers: Andrew Morton, Chris Li, Kairui Song, Linus Torvalds

claim_swapfile now always takes i_rwsem.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 mm/swapfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index bb3261d45b6a..fe6e4c1add0b 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;
-- 
2.24.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help