forked from Minki/linux
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>
This commit is contained in:
parent
0ef82fcefb
commit
fed98ef4d8
@ -3157,7 +3157,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
|
|||||||
mapping = swap_file->f_mapping;
|
mapping = swap_file->f_mapping;
|
||||||
inode = mapping->host;
|
inode = mapping->host;
|
||||||
|
|
||||||
/* If S_ISREG(inode->i_mode) will do inode_lock(inode); */
|
/* will take i_rwsem; */
|
||||||
error = claim_swapfile(p, inode);
|
error = claim_swapfile(p, inode);
|
||||||
if (unlikely(error))
|
if (unlikely(error))
|
||||||
goto bad_swap;
|
goto bad_swap;
|
||||||
|
Loading…
Reference in New Issue
Block a user