From: chuguangqing <chuguangqing@inspur.com>
To: Theodore Ts'o <tytso@mit.edu>, Andreas Dilger <adilger.kernel@dilger.ca>
Cc: <linux-ext4@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
chuguangqing <chuguangqing@inspur.com>
Subject: [PATCH 1/1] Add FALLOC_FL_ALLOCATE_RANGE to the set of supported fallocate mode flags. This change improves code clarity and maintains by explicitly showing this flag in the supported flags mask.
Date: Tue, 15 Jul 2025 11:15:31 +0800 [thread overview]
Message-ID: <20250715031531.1693-2-chuguangqing@inspur.com> (raw)
In-Reply-To: <20250715031531.1693-1-chuguangqing@inspur.com>
Note that since FALLOC_FL_ALLOCATE_RANGE is defined as 0x00, this addition
has no functional modifications.
Signed-off-by: chuguangqing <chuguangqing@inspur.com>
---
fs/ext4/extents.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index b43aa82c1b39..f0f9363fd9fd 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4784,9 +4784,9 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
return -EOPNOTSUPP;
/* Return error if mode is not supported */
- if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE |
- FALLOC_FL_ZERO_RANGE | FALLOC_FL_COLLAPSE_RANGE |
- FALLOC_FL_INSERT_RANGE | FALLOC_FL_WRITE_ZEROES))
+ if (mode & ~(FALL_C_FL_ALLOCATE_RANGE | FALLOC_FL_KEEP_SIZE |
+ FALLOC_FL_PUNCH_HOLE | FALLOC_FL_COLLAPSE_RANGE |
+ FALLOC_FL_ZERO_RANGE | FALLOC_FL_INSERT_RANGE))
return -EOPNOTSUPP;
inode_lock(inode);
--
2.43.5
next prev parent reply other threads:[~2025-07-15 3:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 3:15 [PATCH 0/1] ext4: add FALLOC_FL_ALLOCATE_RANGE to supported flags mask chuguangqing
2025-07-15 3:15 ` chuguangqing [this message]
2025-07-15 14:08 ` [PATCH 1/1] Add FALLOC_FL_ALLOCATE_RANGE to the set of supported fallocate mode flags. This change improves code clarity and maintains by explicitly showing this flag in the " kernel test robot
2025-07-15 4:37 ` [PATCH 0/1] ext4: add FALLOC_FL_ALLOCATE_RANGE to " chuguangqing
2025-07-15 4:37 ` [PATCH 1/1] " chuguangqing
2025-07-15 6:45 ` chuguangqing
2025-07-15 12:34 ` Theodore Ts'o
2025-07-16 2:28 ` [PATCH v2 0/1] " chuguangqing
2025-07-16 2:28 ` [PATCH v2 1/1] " chuguangqing
2025-07-16 2:44 ` Re: [PATCH " chuguangqing
2025-07-15 12:50 ` Zhang Yi
2025-07-16 3:04 ` [PATCH v3 0/1] Re: " chuguangqing
2025-07-16 3:04 ` [PATCH v3] " chuguangqing
2025-07-16 7:05 ` Zhang Yi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250715031531.1693-2-chuguangqing@inspur.com \
--to=chuguangqing@inspur.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).