fs: Remove FS_THP_SUPPORT
Instead of setting a bit in the fs_flags to set a bit in the address_space, set the bit in the address_space directly. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
parent
a1efe484dd
commit
ff36da69bc
4 changed files with 18 additions and 4 deletions
|
|
@ -2518,7 +2518,6 @@ struct file_system_type {
|
|||
#define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */
|
||||
#define FS_DISALLOW_NOTIFY_PERM 16 /* Disable fanotify permission events */
|
||||
#define FS_ALLOW_IDMAP 32 /* FS has been updated to handle vfs idmappings. */
|
||||
#define FS_THP_SUPPORT 8192 /* Remove once all fs converted */
|
||||
#define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */
|
||||
int (*init_fs_context)(struct fs_context *);
|
||||
const struct fs_parameter_spec *parameters;
|
||||
|
|
|
|||
|
|
@ -176,6 +176,22 @@ static inline void mapping_set_gfp_mask(struct address_space *m, gfp_t mask)
|
|||
m->gfp_mask = mask;
|
||||
}
|
||||
|
||||
/**
|
||||
* mapping_set_large_folios() - Indicate the file supports large folios.
|
||||
* @mapping: The file.
|
||||
*
|
||||
* The filesystem should call this function in its inode constructor to
|
||||
* indicate that the VFS can use large folios to cache the contents of
|
||||
* the file.
|
||||
*
|
||||
* Context: This should not be called while the inode is active as it
|
||||
* is non-atomic.
|
||||
*/
|
||||
static inline void mapping_set_large_folios(struct address_space *mapping)
|
||||
{
|
||||
__set_bit(AS_THP_SUPPORT, &mapping->flags);
|
||||
}
|
||||
|
||||
static inline bool mapping_thp_support(struct address_space *mapping)
|
||||
{
|
||||
return test_bit(AS_THP_SUPPORT, &mapping->flags);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue