diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-04-15 23:54:13 +0200 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-04-15 23:54:13 +0200 |
commit | 5b9932f6001c70b984e8c9c2fe09e443beb4baba (patch) | |
tree | fa095c911ab89720b30300a2a592808e2fd6a199 /fs/remap_range.c | |
parent | xfs: constify xfs_bmap_is_written_extent (diff) | |
download | linux-5b9932f6001c70b984e8c9c2fe09e443beb4baba.tar.xz linux-5b9932f6001c70b984e8c9c2fe09e443beb4baba.zip |
vfs: export remap and write check helpers
Export these functions so that the next patch can use them to check the
file ranges being passed to the XFS_IOC_EXCHANGE_RANGE operation.
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/remap_range.c')
-rw-r--r-- | fs/remap_range.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/remap_range.c b/fs/remap_range.c index de07f978ce3e..28246dfc8485 100644 --- a/fs/remap_range.c +++ b/fs/remap_range.c @@ -99,8 +99,7 @@ static int generic_remap_checks(struct file *file_in, loff_t pos_in, return 0; } -static int remap_verify_area(struct file *file, loff_t pos, loff_t len, - bool write) +int remap_verify_area(struct file *file, loff_t pos, loff_t len, bool write) { int mask = write ? MAY_WRITE : MAY_READ; loff_t tmp; @@ -118,6 +117,7 @@ static int remap_verify_area(struct file *file, loff_t pos, loff_t len, return fsnotify_file_area_perm(file, mask, &pos, len); } +EXPORT_SYMBOL_GPL(remap_verify_area); /* * Ensure that we don't remap a partial EOF block in the middle of something |