internal.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 void free_vfsmnt(struct vfsmount *);
  51. extern struct vfsmount *alloc_vfsmnt(const char *);
  52. extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
  53. extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
  54. struct vfsmount *);
  55. extern void release_mounts(struct list_head *);
  56. extern void umount_tree(struct vfsmount *, int, struct list_head *);
  57. extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
  58. extern void __init mnt_init(void);
  59. /*
  60. * fs_struct.c
  61. */
  62. extern void chroot_fs_refs(struct path *, struct path *);
  63. /*
  64. * file_table.c
  65. */
  66. extern void mark_files_ro(struct super_block *);
  67. /*
  68. * super.c
  69. */
  70. extern int do_remount_sb(struct super_block *, int, void *, int);