internal.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. #else
  25. static inline void bdev_cache_init(void)
  26. {
  27. }
  28. static inline int sb_is_blkdev_sb(struct super_block *sb)
  29. {
  30. return 0;
  31. }
  32. #endif
  33. /*
  34. * char_dev.c
  35. */
  36. extern void __init chrdev_init(void);
  37. /*
  38. * exec.c
  39. */
  40. extern int check_unsafe_exec(struct linux_binprm *);
  41. /*
  42. * namespace.c
  43. */
  44. extern int copy_mount_options(const void __user *, unsigned long *);
  45. extern void free_vfsmnt(struct vfsmount *);
  46. extern struct vfsmount *alloc_vfsmnt(const char *);
  47. extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
  48. extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
  49. struct vfsmount *);
  50. extern void release_mounts(struct list_head *);
  51. extern void umount_tree(struct vfsmount *, int, struct list_head *);
  52. extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
  53. extern void __init mnt_init(void);
  54. /*
  55. * fs_struct.c
  56. */
  57. extern void chroot_fs_refs(struct path *, struct path *);