mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 18:00:53 +07:00
289c6aedac
This is practically generic code; other filesystems will want to call it from other places, but there's nothing ext2-specific about it. Make it a little more generic by allowing it to take a count of the number of bytes to zero rather than fixing it to a single page. Thanks to Dave Hansen for suggesting that I need to call cond_resched() if zeroing more than one page. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: Boaz Harrosh <boaz@plexistor.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Dave Chinner <david@fromorbit.com> Cc: Jan Kara <jack@suse.cz> Cc: Jens Axboe <axboe@kernel.dk> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
22 lines
557 B
C
22 lines
557 B
C
/*
|
|
* linux/fs/ext2/xip.h
|
|
*
|
|
* Copyright (C) 2005 IBM Corporation
|
|
* Author: Carsten Otte (cotte@de.ibm.com)
|
|
*/
|
|
|
|
#ifdef CONFIG_EXT2_FS_XIP
|
|
extern void ext2_xip_verify_sb (struct super_block *);
|
|
static inline int ext2_use_xip (struct super_block *sb)
|
|
{
|
|
struct ext2_sb_info *sbi = EXT2_SB(sb);
|
|
return (sbi->s_mount_opt & EXT2_MOUNT_XIP);
|
|
}
|
|
int ext2_get_xip_mem(struct address_space *, pgoff_t, int,
|
|
void **, unsigned long *);
|
|
#else
|
|
#define ext2_xip_verify_sb(sb) do { } while (0)
|
|
#define ext2_use_xip(sb) 0
|
|
#define ext2_get_xip_mem NULL
|
|
#endif
|