[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <fad6f129-c53f-d751-be43-c403b1031449@paragon-software.com>
Date: Tue, 28 Sep 2021 20:25:58 +0300
From: Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
To: <ntfs3@...ts.linux.dev>
CC: <linux-kernel@...r.kernel.org>, <linux-fsdevel@...r.kernel.org>
Subject: [PATCH] fs/ntfs3: Forbid FALLOC_FL_PUNCH_HOLE for normal files
FALLOC_FL_PUNCH_HOLE isn't allowed with normal files.
Fixes xfstest generic/016 021 022
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
---
fs/ntfs3/file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
index 5fb3508e5422..02ca665baa5f 100644
--- a/fs/ntfs3/file.c
+++ b/fs/ntfs3/file.c
@@ -587,8 +587,8 @@ static long ntfs_fallocate(struct file *file, int mode, loff_t vbo, loff_t len)
truncate_pagecache(inode, vbo_down);
if (!is_sparsed(ni) && !is_compressed(ni)) {
- /* Normal file. */
- err = ntfs_zero_range(inode, vbo, end);
+ /* Normal file, can't make hole. */
+ err = -EOPNOTSUPP;
goto out;
}
--
2.33.0
Powered by blists - more mailing lists