1 /*
2 *
3 * Definitions for mount interface. This describes the in the kernel build
4 * linkedlist with mounted filesystems.
5 *
6 * Author: Marco van Wieringen <mvw@planets.elm.net>
7 *
8 * Version: $Id: mount.h,v 2.0 1996/11/17 16:48:14 mvw Exp mvw $
9 *
10 */
11 #ifndef _LINUX_MOUNT_H
12 #define _LINUX_MOUNT_H
13 #ifdef __KERNEL__
14
15 #define MNT_VISIBLE 1
16
17 struct vfsmount
18 {
19 struct dentry *mnt_mountpoint; /* dentry of mountpoint */
20 struct dentry *mnt_root; /* root of the mounted tree */
21 struct vfsmount *mnt_parent; /* fs we are mounted on */
22 struct list_head mnt_instances; /* other vfsmounts of the same fs */
23 struct list_head mnt_clash; /* those who are mounted on (other */
24 /* instances) of the same dentry */
25 struct super_block *mnt_sb; /* pointer to superblock */
26 struct list_head mnt_mounts; /* list of children, anchored here */
27 struct list_head mnt_child; /* and going through their mnt_child */
28 atomic_t mnt_count;
29 int mnt_flags;
30 char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
31 struct list_head mnt_list;
32 uid_t mnt_owner;
33 };
34
35 static inline struct vfsmount *mntget(struct vfsmount *mnt)
36 {
37 if (mnt)
38 atomic_inc(&mnt->mnt_count);
39 return mnt;
40 }
41
42 static inline void mntput(struct vfsmount *mnt)
43 {
44 if (mnt) {
45 if (atomic_dec_and_test(&mnt->mnt_count))
46 BUG();
47 }
48 }
49
50 #endif
51 #endif /* _LINUX_MOUNT_H */
52
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.