Blame view

fs/internal.h 3.58 KB
07f3f05c1   David Howells   [PATCH] BLOCK: Mo...
1
2
3
4
5
6
7
8
9
10
  /* 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.
   */
5e6d12b2c   Andrew Morton   [PATCH] CONFIG_BL...
11
  struct super_block;
9d412a43c   Al Viro   vfs: split off vf...
12
  struct file_system_type;
a6f76f23d   David Howells   CRED: Make execve...
13
  struct linux_binprm;
3e93cd671   Al Viro   Take fs_struct ha...
14
  struct path;
c71053659   Al Viro   vfs: spread struc...
15
  struct mount;
5e6d12b2c   Andrew Morton   [PATCH] CONFIG_BL...
16

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

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

07f3f05c1   David Howells   [PATCH] BLOCK: Mo...
34
35
36
37
38
39
  /*
   * char_dev.c
   */
  extern void __init chrdev_init(void);
  
  /*
0bdaea901   David Howells   VFS: Split inode_...
40
41
42
   * namei.c
   */
  extern int __inode_permission(struct inode *, int);
197df04c7   Al Viro   rename user_path_...
43
44
45
  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 *);
0bdaea901   David Howells   VFS: Split inode_...
46
47
  
  /*
07f3f05c1   David Howells   [PATCH] BLOCK: Mo...
48
49
50
   * namespace.c
   */
  extern int copy_mount_options(const void __user *, unsigned long *);
eca6f534e   Vegard Nossum   fs: fix overflow ...
51
  extern int copy_mount_string(const void __user *, char **);
6d59e7f58   Al Viro   [PATCH] move a bu...
52

0f60f240d   David Howells   FS: lookup_mnt() ...
53
  extern struct vfsmount *lookup_mnt(struct path *);
19a167af7   Al Viro   Take the completi...
54
  extern int finish_automount(struct vfsmount *, struct path *);
6d59e7f58   Al Viro   [PATCH] move a bu...
55

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

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

eb04c2828   Jan Kara   fs: Add freezing ...
60
61
62
63
  extern int __mnt_want_write(struct vfsmount *);
  extern int __mnt_want_write_file(struct file *);
  extern void __mnt_drop_write(struct vfsmount *);
  extern void __mnt_drop_write_file(struct file *);
47cd813f2   Al Viro   Take vfsmount_loc...
64

3e93cd671   Al Viro   Take fs_struct ha...
65
66
67
  /*
   * fs_struct.c
   */
dcf787f39   Al Viro   constify path_get...
68
  extern void chroot_fs_refs(const struct path *, const struct path *);
864d7c4c0   npiggin@suse.de   fs: move mark_fil...
69
70
71
72
  
  /*
   * file_table.c
   */
e81e3f4dc   Eric Paris   fs: move get_empt...
73
  extern struct file *get_empty_filp(void);
62c6943b4   Al Viro   Trim a bit of cra...
74
75
76
77
78
  
  /*
   * super.c
   */
  extern int do_remount_sb(struct super_block *, int, void *, int);
12ad3ab66   Dave Chinner   superblock: move ...
79
  extern bool grab_super_passive(struct super_block *sb);
9d412a43c   Al Viro   vfs: split off vf...
80
81
  extern struct dentry *mount_fs(struct file_system_type *,
  			       int, const char *, void *);
cf31e70d6   Al Viro   vfs: new helper -...
82
  extern struct super_block *user_get_super(dev_t);
482928d59   Al Viro   Fix f_flags/f_mod...
83
84
85
86
  
  /*
   * open.c
   */
47c805dc2   Al Viro   switch do_filp_op...
87
88
  struct open_flags {
  	int open_flag;
a218d0fdc   Al Viro   switch open and m...
89
  	umode_t mode;
47c805dc2   Al Viro   switch do_filp_op...
90
91
  	int acc_mode;
  	int intent;
f9652e10c   Al Viro   allow build_open_...
92
  	int lookup_flags;
47c805dc2   Al Viro   switch do_filp_op...
93
  };
669abf4e5   Jeff Layton   vfs: make path_op...
94
  extern struct file *do_filp_open(int dfd, struct filename *pathname,
f9652e10c   Al Viro   allow build_open_...
95
  		const struct open_flags *op);
73d049a40   Al Viro   open-style analog...
96
  extern struct file *do_file_open_root(struct dentry *, struct vfsmount *,
f9652e10c   Al Viro   allow build_open_...
97
  		const char *, const struct open_flags *);
a8dade34e   Al Viro   unexport invalida...
98

becfd1f37   Aneesh Kumar K.V   vfs: Add open by ...
99
100
  extern long do_handle_open(int mountdirfd,
  			   struct file_handle __user *ufh, int open_flag);
90ad1a8ec   Miklos Szeredi   vfs: split __dent...
101
  extern int open_check_o_direct(struct file *f);
becfd1f37   Aneesh Kumar K.V   vfs: Add open by ...
102

a8dade34e   Al Viro   unexport invalida...
103
104
105
  /*
   * inode.c
   */
55fa6091d   Dave Chinner   fs: move i_sb_lis...
106
  extern spinlock_t inode_sb_list_lock;
9b17c6238   Dave Chinner   fs: convert inode...
107
108
  extern long prune_icache_sb(struct super_block *sb, unsigned long nr_to_scan,
  			    int nid);
4eff96dd5   Jan Kara   writeback: put un...
109
  extern void inode_add_lru(struct inode *inode);
55fa6091d   Dave Chinner   fs: move i_sb_lis...
110

a66979aba   Dave Chinner   fs: move i_wb_lis...
111
112
113
114
  /*
   * fs-writeback.c
   */
  extern void inode_wb_list_del(struct inode *inode);
3942c07cc   Glauber Costa   fs: bump inode an...
115
  extern long get_nr_dirty_inodes(void);
a4cdbd8bf   Al Viro   braino in internal.h
116
  extern void evict_inodes(struct super_block *);
93b270f76   NeilBrown   Fix over-zealous ...
117
  extern int invalidate_inodes(struct super_block *, bool);
a4464dbc0   Al Viro   Make ->d_sb assig...
118
119
120
121
122
  
  /*
   * dcache.c
   */
  extern struct dentry *__d_alloc(struct super_block *, const struct qstr *);
eed810076   Miklos Szeredi   vfs: check unlink...
123
  extern int d_set_mounted(struct dentry *dentry);
9b17c6238   Dave Chinner   fs: convert inode...
124
125
  extern long prune_dcache_sb(struct super_block *sb, unsigned long nr_to_scan,
  			    int nid);
06ae43f34   Al Viro   Don't bother with...
126
127
128
129
130
  
  /*
   * read_write.c
   */
  extern ssize_t __kernel_write(struct file *, const char *, size_t, loff_t *);
68d70d03f   Al Viro   constify rw_verif...
131
  extern int rw_verify_area(int, struct file *, const loff_t *, size_t);
599a0ac14   Al Viro   pipe: fold file_o...
132
133
  
  /*
7995bd287   Al Viro   splice: don't pas...
134
135
136
137
138
139
   * splice.c
   */
  extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
  		loff_t *opos, size_t len, unsigned int flags);
  
  /*
599a0ac14   Al Viro   pipe: fold file_o...
140
141
142
   * pipe.c
   */
  extern const struct file_operations pipefifo_fops;