blob: f67cd141d9a8073bacdf672c12ec91f1deebdd27 [file] [log] [blame]
David Howells07f3f052006-09-30 20:52:18 +02001/* fs/ internal definitions
2 *
3 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
Andrew Morton5e6d12b2006-08-31 12:55:23 +020012struct super_block;
David Howellsa6f76f22008-11-14 10:39:24 +110013struct linux_binprm;
Al Viro3e93cd62009-03-29 19:00:13 -040014struct path;
Andrew Morton5e6d12b2006-08-31 12:55:23 +020015
David Howells07f3f052006-09-30 20:52:18 +020016/*
17 * block_dev.c
18 */
David Howells93614012006-09-30 20:45:40 +020019#ifdef CONFIG_BLOCK
David Howells07f3f052006-09-30 20:52:18 +020020extern struct super_block *blockdev_superblock;
21extern void __init bdev_cache_init(void);
22
Andrew Morton5e6d12b2006-08-31 12:55:23 +020023static inline int sb_is_blkdev_sb(struct super_block *sb)
24{
25 return sb == blockdev_superblock;
26}
David Howells93614012006-09-30 20:45:40 +020027
Jan Kara5cee5812009-04-27 16:43:51 +020028extern int __sync_blockdev(struct block_device *bdev, int wait);
29
Andrew Morton5e6d12b2006-08-31 12:55:23 +020030#else
31static inline void bdev_cache_init(void)
32{
33}
34
35static inline int sb_is_blkdev_sb(struct super_block *sb)
36{
37 return 0;
38}
Jan Kara5cee5812009-04-27 16:43:51 +020039
40static inline int __sync_blockdev(struct block_device *bdev, int wait)
41{
42 return 0;
43}
David Howells93614012006-09-30 20:45:40 +020044#endif
David Howells7b0de422006-08-29 19:06:07 +010045
David Howells07f3f052006-09-30 20:52:18 +020046/*
47 * char_dev.c
48 */
49extern void __init chrdev_init(void);
50
51/*
David Howellsa6f76f22008-11-14 10:39:24 +110052 * exec.c
53 */
Al Viro498052b2009-03-30 07:20:30 -040054extern int check_unsafe_exec(struct linux_binprm *);
David Howellsa6f76f22008-11-14 10:39:24 +110055
56/*
David Howells07f3f052006-09-30 20:52:18 +020057 * namespace.c
58 */
59extern int copy_mount_options(const void __user *, unsigned long *);
Vegard Nossumeca6f532009-09-18 13:05:45 -070060extern int copy_mount_string(const void __user *, char **);
Al Viro6d59e7f2008-03-22 15:48:17 -040061
62extern void free_vfsmnt(struct vfsmount *);
63extern struct vfsmount *alloc_vfsmnt(const char *);
64extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
65extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
66 struct vfsmount *);
67extern void release_mounts(struct list_head *);
68extern void umount_tree(struct vfsmount *, int, struct list_head *);
69extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
70
71extern void __init mnt_init(void);
Al Viro3e93cd62009-03-29 19:00:13 -040072
73/*
74 * fs_struct.c
75 */
76extern void chroot_fs_refs(struct path *, struct path *);
npiggin@suse.de864d7c42009-04-26 20:25:56 +100077
78/*
79 * file_table.c
80 */
81extern void mark_files_ro(struct super_block *);
Eric Parise81e3f42009-12-04 15:47:36 -050082extern struct file *get_empty_filp(void);
Al Viro62c69432009-05-07 03:12:29 -040083
84/*
85 * super.c
86 */
87extern int do_remount_sb(struct super_block *, int, void *, int);