vfs: don't allow writes to swap files
Don't let userspace write to an active swap file because the kernel effectively has a long term lease on the storage and things could get seriously corrupted if we let this happen. Signed-off-by:Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by:
Christoph Hellwig <hch@lst.de>
Showing
- fs/block_dev.c 3 additions, 0 deletionsfs/block_dev.c
- include/linux/fs.h 11 additions, 0 deletionsinclude/linux/fs.h
- mm/filemap.c 3 additions, 0 deletionsmm/filemap.c
- mm/memory.c 4 additions, 0 deletionsmm/memory.c
- mm/mmap.c 6 additions, 2 deletionsmm/mmap.c
- mm/swapfile.c 11 additions, 1 deletionmm/swapfile.c
Loading
Please register or sign in to comment