Blame view

fs/internal.h 5 KB
2874c5fd2   Thomas Gleixner   treewide: Replace...
1
  /* SPDX-License-Identifier: GPL-2.0-or-later */
07f3f05c1   David Howells   [PATCH] BLOCK: Mo...
2
3
4
5
  /* fs/ internal definitions
   *
   * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
   * Written by David Howells (dhowells@redhat.com)
07f3f05c1   David Howells   [PATCH] BLOCK: Mo...
6
   */
5e6d12b2c   Andrew Morton   [PATCH] CONFIG_BL...
7
  struct super_block;
9d412a43c   Al Viro   vfs: split off vf...
8
  struct file_system_type;
ae259a9c8   Christoph Hellwig   fs: introduce iom...
9
  struct iomap;
befb503ca   Christoph Hellwig   iomap: expose iom...
10
  struct iomap_ops;
a6f76f23d   David Howells   CRED: Make execve...
11
  struct linux_binprm;
3e93cd671   Al Viro   Take fs_struct ha...
12
  struct path;
c71053659   Al Viro   vfs: spread struc...
13
  struct mount;
503c358cf   Vladimir Davydov   list_lru: introdu...
14
  struct shrink_control;
9bc61ab18   David Howells   vfs: Introduce fs...
15
  struct fs_context;
2527b284d   Al Viro   move the capabili...
16
  struct user_namespace;
5e6d12b2c   Andrew Morton   [PATCH] CONFIG_BL...
17

07f3f05c1   David Howells   [PATCH] BLOCK: Mo...
18
19
20
  /*
   * block_dev.c
   */
9361401eb   David Howells   [PATCH] BLOCK: Ma...
21
  #ifdef CONFIG_BLOCK
07f3f05c1   David Howells   [PATCH] BLOCK: Mo...
22
  extern void __init bdev_cache_init(void);
5cee5815d   Jan Kara   vfs: Make sys_syn...
23
  extern int __sync_blockdev(struct block_device *bdev, int wait);
9361401eb   David Howells   [PATCH] BLOCK: Ma...
24
  #else
5e6d12b2c   Andrew Morton   [PATCH] CONFIG_BL...
25
26
27
  static inline void bdev_cache_init(void)
  {
  }
9361401eb   David Howells   [PATCH] BLOCK: Ma...
28

5cee5815d   Jan Kara   vfs: Make sys_syn...
29
30
31
32
  static inline int __sync_blockdev(struct block_device *bdev, int wait)
  {
  	return 0;
  }
9361401eb   David Howells   [PATCH] BLOCK: Ma...
33
  #endif
7b0de42d7   David Howells   [PATCH] BLOCK: Re...
34

07f3f05c1   David Howells   [PATCH] BLOCK: Mo...
35
  /*
4db96b71e   Akinobu Mita   vfs: guard end of...
36
37
38
   * buffer.c
   */
  extern void guard_bio_eod(int rw, struct bio *bio);
ae259a9c8   Christoph Hellwig   fs: introduce iom...
39
40
  extern int __block_write_begin_int(struct page *page, loff_t pos, unsigned len,
  		get_block_t *get_block, struct iomap *iomap);
4db96b71e   Akinobu Mita   vfs: guard end of...
41
42
  
  /*
07f3f05c1   David Howells   [PATCH] BLOCK: Mo...
43
44
45
46
47
   * char_dev.c
   */
  extern void __init chrdev_init(void);
  
  /*
9bc61ab18   David Howells   vfs: Introduce fs...
48
49
   * fs_context.c
   */
ecdab150f   David Howells   vfs: syscall: Add...
50
  extern const struct fs_context_operations legacy_fs_context_ops;
9bc61ab18   David Howells   vfs: Introduce fs...
51
  extern int parse_monolithic_mount_data(struct fs_context *, void *);
c9ce29ed7   Al Viro   vfs_get_tree(): e...
52
  extern void fc_drop_locked(struct fs_context *);
ecdab150f   David Howells   vfs: syscall: Add...
53
54
  extern void vfs_clean_context(struct fs_context *fc);
  extern int finish_clean_context(struct fs_context *fc);
9bc61ab18   David Howells   vfs: Introduce fs...
55
56
  
  /*
0bdaea901   David Howells   VFS: Split inode_...
57
58
   * namei.c
   */
31d921c7f   David Howells   vfs: Add configur...
59
60
  extern int filename_lookup(int dfd, struct filename *name, unsigned flags,
  			   struct path *path, struct path *root);
197df04c7   Al Viro   rename user_path_...
61
62
63
  extern int user_path_mountpoint_at(int, const char __user *, unsigned int, struct path *);
  extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
  			   const char *, unsigned int, struct path *);
87c4e1926   Dominik Brodowski   fs: add do_mknoda...
64
65
  long do_mknodat(int dfd, const char __user *filename, umode_t mode,
  		unsigned int dev);
0101db7a3   Dominik Brodowski   fs: add do_mkdira...
66
  long do_mkdirat(int dfd, const char __user *pathname, umode_t mode);
f459dffae   Dominik Brodowski   fs: add ksys_rmdi...
67
  long do_rmdir(int dfd, const char __user *pathname);
da2f1362c   Christoph Hellwig   fs: expose do_unl...
68
  long do_unlinkat(int dfd, struct filename *name);
b724e846b   Dominik Brodowski   fs: add do_symlin...
69
70
  long do_symlinkat(const char __user *oldname, int newdfd,
  		  const char __user *newname);
46ea89eb6   Dominik Brodowski   fs: add do_linkat...
71
72
  int do_linkat(int olddfd, const char __user *oldname, int newdfd,
  	      const char __user *newname, int flags);
0bdaea901   David Howells   VFS: Split inode_...
73
74
  
  /*
07f3f05c1   David Howells   [PATCH] BLOCK: Mo...
75
76
   * namespace.c
   */
b40ef8696   Al Viro   saner calling con...
77
  extern void *copy_mount_options(const void __user *);
b8850d1fa   Tim Gardner   fs: namespace: su...
78
  extern char *copy_mount_string(const void __user *);
6d59e7f58   Al Viro   [PATCH] move a bu...
79

ca71cf71e   Al Viro   namespace.c: cons...
80
  extern struct vfsmount *lookup_mnt(const struct path *);
19a167af7   Al Viro   Take the completi...
81
  extern int finish_automount(struct vfsmount *, struct path *);
6d59e7f58   Al Viro   [PATCH] move a bu...
82

4ed5e82fe   Miklos Szeredi   vfs: protect remo...
83
  extern int sb_prepare_remount_readonly(struct super_block *);
f03c65993   Al Viro   sanitize vfsmount...
84

6d59e7f58   Al Viro   [PATCH] move a bu...
85
  extern void __init mnt_init(void);
3e93cd671   Al Viro   Take fs_struct ha...
86

eb04c2828   Jan Kara   fs: Add freezing ...
87
  extern int __mnt_want_write_file(struct file *);
eb04c2828   Jan Kara   fs: Add freezing ...
88
  extern void __mnt_drop_write_file(struct file *);
47cd813f2   Al Viro   Take vfsmount_loc...
89

a07b20004   Al Viro   vfs: syscall: Add...
90
  extern void dissolve_on_fput(struct vfsmount *);
3e93cd671   Al Viro   Take fs_struct ha...
91
92
93
  /*
   * fs_struct.c
   */
dcf787f39   Al Viro   constify path_get...
94
  extern void chroot_fs_refs(const struct path *, const struct path *);
864d7c4c0   npiggin@suse.de   fs: move mark_fil...
95
96
97
98
  
  /*
   * file_table.c
   */
ea73ea727   Al Viro   pass ->f_flags va...
99
  extern struct file *alloc_empty_file(int, const struct cred *);
d3b1084df   Miklos Szeredi   vfs: make open_wi...
100
  extern struct file *alloc_empty_file_noaccount(int, const struct cred *);
62c6943b4   Al Viro   Trim a bit of cra...
101
102
103
104
  
  /*
   * super.c
   */
8d0347f6c   David Howells   convert do_remoun...
105
  extern int reconfigure_super(struct fs_context *);
eb6ef3df4   Konstantin Khlebnikov   trylock_super(): ...
106
  extern bool trylock_super(struct super_block *sb);
cf31e70d6   Al Viro   vfs: new helper -...
107
  extern struct super_block *user_get_super(dev_t);
20284ab74   Al Viro   switch mount_capa...
108
  extern bool mount_capable(struct fs_context *);
482928d59   Al Viro   Fix f_flags/f_mod...
109
110
111
112
  
  /*
   * open.c
   */
47c805dc2   Al Viro   switch do_filp_op...
113
114
  struct open_flags {
  	int open_flag;
a218d0fdc   Al Viro   switch open and m...
115
  	umode_t mode;
47c805dc2   Al Viro   switch do_filp_op...
116
117
  	int acc_mode;
  	int intent;
f9652e10c   Al Viro   allow build_open_...
118
  	int lookup_flags;
47c805dc2   Al Viro   switch do_filp_op...
119
  };
669abf4e5   Jeff Layton   vfs: make path_op...
120
  extern struct file *do_filp_open(int dfd, struct filename *pathname,
f9652e10c   Al Viro   allow build_open_...
121
  		const struct open_flags *op);
73d049a40   Al Viro   open-style analog...
122
  extern struct file *do_file_open_root(struct dentry *, struct vfsmount *,
f9652e10c   Al Viro   allow build_open_...
123
  		const char *, const struct open_flags *);
a8dade34e   Al Viro   unexport invalida...
124

411d9475c   Dominik Brodowski   fs: add ksys_ftru...
125
  long do_sys_ftruncate(unsigned int fd, loff_t length, int small);
cbfe20f56   Dominik Brodowski   fs: add do_facces...
126
  long do_faccessat(int dfd, const char __user *filename, int mode);
03450e271   Dominik Brodowski   fs: add ksys_fchm...
127
  int do_fchmodat(int dfd, const char __user *filename, umode_t mode);
55731b3cd   Dominik Brodowski   fs: add do_fchown...
128
129
  int do_fchownat(int dfd, const char __user *filename, uid_t user, gid_t group,
  		int flag);
03450e271   Dominik Brodowski   fs: add ksys_fchm...
130

ae2bb293a   Al Viro   get rid of cred a...
131
  extern int vfs_open(const struct path *, struct file *);
becfd1f37   Aneesh Kumar K.V   vfs: Add open by ...
132

a8dade34e   Al Viro   unexport invalida...
133
134
135
  /*
   * inode.c
   */
503c358cf   Vladimir Davydov   list_lru: introdu...
136
  extern long prune_icache_sb(struct super_block *sb, struct shrink_control *sc);
4eff96dd5   Jan Kara   writeback: put un...
137
  extern void inode_add_lru(struct inode *inode);
f0fce87c3   Miklos Szeredi   vfs: make dentry_...
138
  extern int dentry_needs_remove_privs(struct dentry *dentry);
55fa6091d   Dave Chinner   fs: move i_sb_lis...
139

a66979aba   Dave Chinner   fs: move i_wb_lis...
140
141
142
  /*
   * fs-writeback.c
   */
c7f540849   Dave Chinner   inode: rename i_w...
143
  extern void inode_io_list_del(struct inode *inode);
a66979aba   Dave Chinner   fs: move i_wb_lis...
144

3942c07cc   Glauber Costa   fs: bump inode an...
145
  extern long get_nr_dirty_inodes(void);
93b270f76   NeilBrown   Fix over-zealous ...
146
  extern int invalidate_inodes(struct super_block *, bool);
a4464dbc0   Al Viro   Make ->d_sb assig...
147
148
149
150
  
  /*
   * dcache.c
   */
eed810076   Miklos Szeredi   vfs: check unlink...
151
  extern int d_set_mounted(struct dentry *dentry);
503c358cf   Vladimir Davydov   list_lru: introdu...
152
  extern long prune_dcache_sb(struct super_block *sb, struct shrink_control *sc);
ba65dc5ef   Al Viro   much milder d_wal...
153
  extern struct dentry *d_alloc_cursor(struct dentry *);
ab1152dd5   Al Viro   unexport d_alloc_...
154
  extern struct dentry * d_alloc_pseudo(struct super_block *, const struct qstr *);
7e5f7bb08   Al Viro   unexport simple_d...
155
  extern char *simple_dname(struct dentry *, char *, int);
9bdebc2bd   Al Viro   Teach shrink_dcac...
156
157
  extern void dput_to_list(struct dentry *, struct list_head *);
  extern void shrink_dentry_list(struct list_head *);
06ae43f34   Al Viro   Don't bother with...
158
159
160
161
  
  /*
   * read_write.c
   */
68d70d03f   Al Viro   constify rw_verif...
162
  extern int rw_verify_area(int, struct file *, const loff_t *, size_t);
599a0ac14   Al Viro   pipe: fold file_o...
163
164
165
166
167
  
  /*
   * pipe.c
   */
  extern const struct file_operations pipefifo_fops;
8fa1f1c2b   Al Viro   make fs/{namespac...
168
169
170
171
  
  /*
   * fs_pin.c
   */
fdab684d7   Al Viro   allow attaching f...
172
  extern void group_pin_kill(struct hlist_head *p);
8fa1f1c2b   Al Viro   make fs/{namespac...
173
  extern void mnt_pin_kill(struct mount *m);
e149ed2b8   Al Viro   take the targets ...
174
175
176
177
  
  /*
   * fs/nsfs.c
   */
be218aa2e   Rasmus Villemoes   fs/internal.h: ad...
178
  extern const struct dentry_operations ns_dentry_operations;
66cf191f3   Al Viro   compat_ioctl: don...
179
180
181
182
183
184
  
  /*
   * fs/ioctl.c
   */
  extern int do_vfs_ioctl(struct file *file, unsigned int fd, unsigned int cmd,
  		    unsigned long arg);
befb503ca   Christoph Hellwig   iomap: expose iom...
185

ec1b82609   Christoph Hellwig   fs: make sb_init_...
186
187
  /* direct-io.c: */
  int sb_init_dio_done_wq(struct super_block *sb);