Files
android_kernel_motorola_sm6225/fs/internal.h
T

190 lines
5.0 KiB
C
Raw Normal View History

/* fs/ internal definitions
*
* Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
* Written by David Howells (dhowells@redhat.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
2006-08-31 12:55:23 +02:00
struct super_block;
struct file_system_type;
2016-06-21 09:23:11 +10:00
struct iomap;
2016-09-19 11:24:49 +10:00
struct iomap_ops;
struct linux_binprm;
struct path;
struct mount;
struct shrink_control;
2006-08-31 12:55:23 +02:00
/*
* block_dev.c
*/
#ifdef CONFIG_BLOCK
extern void __init bdev_cache_init(void);
extern int __sync_blockdev(struct block_device *bdev, int wait);
2006-08-31 12:55:23 +02:00
#else
static inline void bdev_cache_init(void)
{
}
static inline int __sync_blockdev(struct block_device *bdev, int wait)
{
return 0;
}
#endif
/*
* buffer.c
*/
extern void guard_bio_eod(int rw, struct bio *bio);
2016-06-21 09:23:11 +10:00
extern int __block_write_begin_int(struct page *page, loff_t pos, unsigned len,
get_block_t *get_block, struct iomap *iomap);
2018-06-19 15:10:55 -07:00
int __generic_write_end(struct inode *inode, loff_t pos, unsigned copied,
struct page *page);
/*
* char_dev.c
*/
extern void __init chrdev_init(void);
2012-06-25 12:55:46 +01:00
/*
* namei.c
*/
extern int user_path_mountpoint_at(int, const char __user *, unsigned int, struct path *);
long do_mknodat(int dfd, const char __user *filename, umode_t mode,
unsigned int dev);
long do_mkdirat(int dfd, const char __user *pathname, umode_t mode);
long do_rmdir(int dfd, const char __user *pathname);
2017-11-04 13:44:45 +03:00
long do_unlinkat(int dfd, struct filename *name);
long do_symlinkat(const char __user *oldname, int newdfd,
const char __user *newname);
int do_linkat(int olddfd, const char __user *oldname, int newdfd,
const char __user *newname, int flags);
2012-06-25 12:55:46 +01:00
/*
* namespace.c
*/
extern void *copy_mount_options(const void __user *);
extern char *copy_mount_string(const void __user *);
extern struct vfsmount *lookup_mnt(const struct path *);
extern int finish_automount(struct vfsmount *, struct path *);
extern int sb_prepare_remount_readonly(struct super_block *);
2011-01-14 22:30:21 -05:00
extern void __init mnt_init(void);
extern int __mnt_want_write_file(struct file *);
extern void __mnt_drop_write_file(struct file *);
2010-02-05 02:01:14 -05:00
/*
* fs_struct.c
*/
extern void chroot_fs_refs(const struct path *, const struct path *);
2009-04-26 20:25:56 +10:00
/*
* file_table.c
*/
2018-07-11 15:00:04 -04:00
extern struct file *alloc_empty_file(int, const struct cred *);
extern struct file *alloc_empty_file_noaccount(int, const struct cred *);
2009-05-07 03:12:29 -04:00
/*
* super.c
*/
extern int do_remount_sb(struct super_block *, int, void *, int);
extern int do_remount_sb2(struct vfsmount *, struct super_block *, int,
void *, int);
extern bool trylock_super(struct super_block *sb);
extern struct dentry *mount_fs(struct file_system_type *,
int, const char *, struct vfsmount *, void *);
2012-01-02 22:28:36 -05:00
extern struct super_block *user_get_super(dev_t);
/*
* open.c
*/
2011-02-23 17:44:09 -05:00
struct open_flags {
int open_flag;
2011-11-21 14:59:34 -05:00
umode_t mode;
2011-02-23 17:44:09 -05:00
int acc_mode;
int intent;
2013-06-11 08:23:01 +04:00
int lookup_flags;
2011-02-23 17:44:09 -05:00
};
extern struct file *do_filp_open(int dfd, struct filename *pathname,
2013-06-11 08:23:01 +04:00
const struct open_flags *op);
2011-03-11 12:08:24 -05:00
extern struct file *do_file_open_root(struct dentry *, struct vfsmount *,
2013-06-11 08:23:01 +04:00
const char *, const struct open_flags *);
2010-10-24 11:13:10 -04:00
long do_sys_ftruncate(unsigned int fd, loff_t length, int small);
long do_faccessat(int dfd, const char __user *filename, int mode);
int do_fchmodat(int dfd, const char __user *filename, umode_t mode);
int do_fchownat(int dfd, const char __user *filename, uid_t user, gid_t group,
int flag);
extern int vfs_open(const struct path *, struct file *);
2011-01-29 18:43:26 +05:30
2010-10-24 11:13:10 -04:00
/*
* inode.c
*/
extern long prune_icache_sb(struct super_block *sb, struct shrink_control *sc);
extern void inode_add_lru(struct inode *inode);
extern int dentry_needs_remove_privs(struct dentry *dentry);
/*
* fs-writeback.c
*/
2015-03-04 14:07:22 -05:00
extern void inode_io_list_del(struct inode *inode);
2013-08-28 10:17:53 +10:00
extern long get_nr_dirty_inodes(void);
extern int invalidate_inodes(struct super_block *, bool);
2011-07-07 15:03:58 -04:00
/*
* dcache.c
*/
extern struct dentry *__d_alloc(struct super_block *, const struct qstr *);
2013-09-05 14:39:11 +02:00
extern int d_set_mounted(struct dentry *dentry);
extern long prune_dcache_sb(struct super_block *sb, struct shrink_control *sc);
2016-06-10 11:32:47 -04:00
extern struct dentry *d_alloc_cursor(struct dentry *);
/*
* read_write.c
*/
2013-06-19 15:26:04 +04:00
extern int rw_verify_area(int, struct file *, const loff_t *, size_t);
2013-03-12 09:58:10 -04:00
/*
* pipe.c
*/
extern const struct file_operations pipefifo_fops;
/*
* fs_pin.c
*/
extern void group_pin_kill(struct hlist_head *p);
extern void mnt_pin_kill(struct mount *m);
/*
* fs/nsfs.c
*/
extern const struct dentry_operations ns_dentry_operations;
/*
* fs/ioctl.c
*/
extern int do_vfs_ioctl(struct file *file, unsigned int fd, unsigned int cmd,
unsigned long arg);
2016-09-19 11:24:49 +10:00
/*
* iomap support:
*/
typedef loff_t (*iomap_actor_t)(struct inode *inode, loff_t pos, loff_t len,
void *data, struct iomap *iomap);
loff_t iomap_apply(struct inode *inode, loff_t pos, loff_t length,
2017-01-27 23:20:26 -08:00
unsigned flags, const struct iomap_ops *ops, void *data,
2016-09-19 11:24:49 +10:00
iomap_actor_t actor);
/* direct-io.c: */
int sb_init_dio_done_wq(struct super_block *sb);