diff options
author | Christoph Hellwig <hch@lst.de> | 2024-08-27 08:50:45 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-08-28 16:53:57 +0200 |
commit | ad01dadaa9dc1e8aed1aa372d2a030407835137f (patch) | |
tree | c35ee6746bde99c97fbdcec2d15ba33c997640ed | |
parent | 47ac09b91befbb6a235ab620c32af719f8208399 (diff) | |
download | linux-ad01dadaa9dc1e8aed1aa372d2a030407835137f.tar.gz linux-ad01dadaa9dc1e8aed1aa372d2a030407835137f.tar.bz2 linux-ad01dadaa9dc1e8aed1aa372d2a030407835137f.zip |
block: remove checks for FALLOC_FL_NO_HIDE_STALE
While the FALLOC_FL_NO_HIDE_STALE value has been registered, it has
always been rejected by vfs_fallocate before making it into
blkdev_fallocate because it isn't in the supported mask.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240827065123.1762168-2-hch@lst.de
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r-- | block/fops.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/block/fops.c b/block/fops.c index 9825c1713a49..7f48f03a62e9 100644 --- a/block/fops.c +++ b/block/fops.c @@ -771,7 +771,7 @@ reexpand: #define BLKDEV_FALLOC_FL_SUPPORTED \ (FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE | \ - FALLOC_FL_ZERO_RANGE | FALLOC_FL_NO_HIDE_STALE) + FALLOC_FL_ZERO_RANGE) static long blkdev_fallocate(struct file *file, int mode, loff_t start, loff_t len) @@ -830,14 +830,6 @@ static long blkdev_fallocate(struct file *file, int mode, loff_t start, len >> SECTOR_SHIFT, GFP_KERNEL, BLKDEV_ZERO_NOFALLBACK); break; - case FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE | FALLOC_FL_NO_HIDE_STALE: - error = truncate_bdev_range(bdev, file_to_blk_mode(file), start, end); - if (error) - goto fail; - - error = blkdev_issue_discard(bdev, start >> SECTOR_SHIFT, - len >> SECTOR_SHIFT, GFP_KERNEL); - break; default: error = -EOPNOTSUPP; } |