Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf1ea059 authored by Jan Kara's avatar Jan Kara Committed by Darrick J. Wong
Browse files

fs: Export generic_fadvise()



Filesystems will need to call this function from their fadvise handlers.

CC: stable@vger.kernel.org
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 692fe624
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3531,6 +3531,8 @@ extern void inode_nohighmem(struct inode *inode);
/* mm/fadvise.c */
extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len,
		       int advice);
extern int generic_fadvise(struct file *file, loff_t offset, loff_t len,
			   int advice);

#if defined(CONFIG_IO_URING)
extern struct sock *io_uring_get_socket(struct file *file);
+2 −2
Original line number Diff line number Diff line
@@ -27,8 +27,7 @@
 * deactivate the pages and clear PG_Referenced.
 */

static int generic_fadvise(struct file *file, loff_t offset, loff_t len,
			   int advice)
int generic_fadvise(struct file *file, loff_t offset, loff_t len, int advice)
{
	struct inode *inode;
	struct address_space *mapping;
@@ -178,6 +177,7 @@ static int generic_fadvise(struct file *file, loff_t offset, loff_t len,
	}
	return 0;
}
EXPORT_SYMBOL(generic_fadvise);

int vfs_fadvise(struct file *file, loff_t offset, loff_t len, int advice)
{