[NET]: Add some sparse annotations to network driver stack.
[linux-2.6/history.git] / include / linux / mount.h
blob61554dda78a8c0e0c9daf8468f431dbed9ca127e
1 /*
3 * Definitions for mount interface. This describes the in the kernel build
4 * linkedlist with mounted filesystems.
6 * Author: Marco van Wieringen <mvw@planets.elm.net>
8 * Version: $Id: mount.h,v 2.0 1996/11/17 16:48:14 mvw Exp mvw $
11 #ifndef _LINUX_MOUNT_H
12 #define _LINUX_MOUNT_H
13 #ifdef __KERNEL__
15 #include <linux/list.h>
17 #define MNT_NOSUID 1
18 #define MNT_NODEV 2
19 #define MNT_NOEXEC 4
21 struct vfsmount
23 struct list_head mnt_hash;
24 struct vfsmount *mnt_parent; /* fs we are mounted on */
25 struct dentry *mnt_mountpoint; /* dentry of mountpoint */
26 struct dentry *mnt_root; /* root of the mounted tree */
27 struct super_block *mnt_sb; /* pointer to superblock */
28 struct list_head mnt_mounts; /* list of children, anchored here */
29 struct list_head mnt_child; /* and going through their mnt_child */
30 atomic_t mnt_count;
31 int mnt_flags;
32 char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
33 struct list_head mnt_list;
36 static inline struct vfsmount *mntget(struct vfsmount *mnt)
38 if (mnt)
39 atomic_inc(&mnt->mnt_count);
40 return mnt;
43 extern void __mntput(struct vfsmount *mnt);
45 static inline void mntput(struct vfsmount *mnt)
47 if (mnt) {
48 if (atomic_dec_and_test(&mnt->mnt_count))
49 __mntput(mnt);
53 extern void free_vfsmnt(struct vfsmount *mnt);
54 extern struct vfsmount *alloc_vfsmnt(const char *name);
55 extern struct vfsmount *do_kern_mount(const char *fstype, int flags,
56 const char *name, void *data);
57 extern spinlock_t vfsmount_lock;
59 #endif
60 #endif /* _LINUX_MOUNT_H */