zonefs: prevent use of seq files as swap file
authorDamien Le Moal <damien.lemoal@wdc.com>
Mon, 15 Mar 2021 03:43:55 +0000 (12:43 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Mar 2021 08:04:05 +0000 (09:04 +0100)
commit9c1c5e81a00250628b1dea74b815fc641ee77952
tree0da8c8b0d054a52cb959cfebbe864c378e08fe58
parentdfbdbf0f359abbe5005ee3d99d1923af904c8584
zonefs: prevent use of seq files as swap file

commit 1601ea068b886da1f8f8d4e18b9403e9e24adef6 upstream.

The sequential write constraint of sequential zone file prevent their
use as swap files. Only allow conventional zone files to be used as swap
files.

Fixes: 8dcc1a9d90c1 ("fs: New zonefs file system")
Cc: <stable@vger.kernel.org>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/zonefs/super.c