]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
vfs: Export rw_verify_area() for use by cachefiles
authorDavid Howells <dhowells@redhat.com>
Mon, 10 Feb 2020 10:00:21 +0000 (10:00 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 21 Jan 2021 17:30:46 +0000 (17:30 +0000)
Export rw_verify_area() for so that cachefiles can use it before issuing
call_read_iter() and call_write_iter() to effect async DIO operations
against the cache.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/internal.h
fs/read_write.c
include/linux/fs.h

index 77c50befbfbe96181a616d3ac63ee6a29565d847..92e686249c40345aa9ec0ea5be28050f70c1c06a 100644 (file)
@@ -164,11 +164,6 @@ extern char *simple_dname(struct dentry *, char *, int);
 extern void dput_to_list(struct dentry *, struct list_head *);
 extern void shrink_dentry_list(struct list_head *);
 
-/*
- * read_write.c
- */
-extern int rw_verify_area(int, struct file *, const loff_t *, size_t);
-
 /*
  * pipe.c
  */
index 75f764b434184238a33f3c9bc688bfb395b83cb9..fe84e11245bd5242c2a69d34bbebda95eb65f154 100644 (file)
@@ -400,6 +400,7 @@ int rw_verify_area(int read_write, struct file *file, const loff_t *ppos, size_t
        return security_file_permission(file,
                                read_write == READ ? MAY_READ : MAY_WRITE);
 }
+EXPORT_SYMBOL(rw_verify_area);
 
 static ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos)
 {
index fd47deea7c1764627cd5549ed6380126e86ecef6..493804856ab3b1d33d8264b640287d7da988455a 100644 (file)
@@ -2760,6 +2760,7 @@ extern int notify_change(struct dentry *, struct iattr *, struct inode **);
 extern int inode_permission(struct inode *, int);
 extern int generic_permission(struct inode *, int);
 extern int __check_sticky(struct inode *dir, struct inode *inode);
+extern int rw_verify_area(int, struct file *, const loff_t *, size_t);
 
 static inline bool execute_ok(struct inode *inode)
 {