internal.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /* 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. struct super_block;
  12. struct linux_binprm;
  13. struct path;
  14. /*
  15. * block_dev.c
  16. */
  17. #ifdef CONFIG_BLOCK
  18. extern struct super_block *blockdev_superblock;
  19. extern void __init bdev_cache_init(void);
  20. static inline int sb_is_blkdev_sb(struct super_block *sb)
  21. {
  22. return sb == blockdev_superblock;
  23. }
  24. extern int __sync_blockdev(struct block_device *bdev, int wait);
  25. #else
  26. static inline void bdev_cache_init(void)
  27. {
  28. }
  29. static inline int sb_is_blkdev_sb(struct super_block *sb)
  30. {
  31. return 0;
  32. }
  33. static inline int __sync_blockdev(struct block_device *bdev, int wait)
  34. {
  35. return 0;
  36. }
  37. #endif
  38. /*
  39. * char_dev.c
  40. */
  41. extern void __init chrdev_init(void);
  42. /*
  43. * exec.c
  44. */
  45. extern int check_unsafe_exec(struct linux_binprm *);
  46. /*
  47. * namespace.c
  48. */
  49. extern int copy_mount_options(const void __user *, unsigned long *);
  50. extern int copy_mount_string(const void __user *, char **);
  51. extern void free_vfsmnt(struct vfsmount *);
  52. extern struct vfsmount *alloc_vfsmnt(const char *);
  53. extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
  54. extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
  55. struct vfsmount *);
  56. extern void release_mounts(struct list_head *);
  57. extern void umount_tree(struct vfsmount *, int, struct list_head *);
  58. extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
  59. extern void __init mnt_init(void);
  60. /*
  61. * fs_struct.c
  62. */
  63. extern void chroot_fs_refs(struct path *, struct path *);
  64. /*
  65. * file_table.c
  66. */
  67. extern void mark_files_ro(struct super_block *);
  68. /*
  69. * super.c
  70. */
  71. extern int do_remount_sb(struct super_block *, int, void *, int);