OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [LINUX_2_4_26_OR32/] [linux/] [linux-2.4/] [include/] [linux/] [mount.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
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 1.1.1.1 2004-04-15 02:36:18 phoenix Exp $
9
 *
10
 */
11
#ifndef _LINUX_MOUNT_H
12
#define _LINUX_MOUNT_H
13
#ifdef __KERNEL__
14
 
15
#define MNT_NOSUID      1
16
#define MNT_NODEV       2
17
#define MNT_NOEXEC      4
18
 
19
struct vfsmount
20
{
21
        struct list_head mnt_hash;
22
        struct vfsmount *mnt_parent;    /* fs we are mounted on */
23
        struct dentry *mnt_mountpoint;  /* dentry of mountpoint */
24
        struct dentry *mnt_root;        /* root of the mounted tree */
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
};
33
 
34
static inline struct vfsmount *mntget(struct vfsmount *mnt)
35
{
36
        if (mnt)
37
                atomic_inc(&mnt->mnt_count);
38
        return mnt;
39
}
40
 
41
extern void __mntput(struct vfsmount *mnt);
42
 
43
static inline void mntput(struct vfsmount *mnt)
44
{
45
        if (mnt) {
46
                if (atomic_dec_and_test(&mnt->mnt_count))
47
                        __mntput(mnt);
48
        }
49
}
50
 
51
#endif
52
#endif /* _LINUX_MOUNT_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.