Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
mount.h File Reference
#include <linux/types.h>
#include <linux/list.h>
#include <linux/nodemask.h>
#include <linux/spinlock.h>
#include <linux/seqlock.h>
#include <linux/atomic.h>

Go to the source code of this file.

Data Structures

struct  vfsmount
 

Macros

#define MNT_NOSUID   0x01
 
#define MNT_NODEV   0x02
 
#define MNT_NOEXEC   0x04
 
#define MNT_NOATIME   0x08
 
#define MNT_NODIRATIME   0x10
 
#define MNT_RELATIME   0x20
 
#define MNT_READONLY   0x40 /* does the user want this to be r/o? */
 
#define MNT_SHRINKABLE   0x100
 
#define MNT_WRITE_HOLD   0x200
 
#define MNT_SHARED   0x1000 /* if the vfsmount is a shared mount */
 
#define MNT_UNBINDABLE   0x2000 /* if the vfsmount is a unbindable mount */
 
#define MNT_SHARED_MASK   (MNT_UNBINDABLE)
 
#define MNT_PROPAGATION_MASK   (MNT_SHARED | MNT_UNBINDABLE)
 
#define MNT_INTERNAL   0x4000
 

Functions

int mnt_want_write (struct vfsmount *mnt)
 
int mnt_want_write_file (struct file *file)
 
int mnt_clone_write (struct vfsmount *mnt)
 
void mnt_drop_write (struct vfsmount *mnt)
 
void mnt_drop_write_file (struct file *file)
 
void mntput (struct vfsmount *mnt)
 
struct vfsmountmntget (struct vfsmount *mnt)
 
void mnt_pin (struct vfsmount *mnt)
 
void mnt_unpin (struct vfsmount *mnt)
 
int __mnt_is_readonly (struct vfsmount *mnt)
 
struct vfsmountvfs_kern_mount (struct file_system_type *type, int flags, const char *name, void *data)
 
void mnt_set_expiry (struct vfsmount *mnt, struct list_head *expiry_list)
 
void mark_mounts_for_expiry (struct list_head *mounts)
 
dev_t name_to_dev_t (char *name)
 

Macro Definition Documentation

#define MNT_INTERNAL   0x4000

Definition at line 48 of file mount.h.

#define MNT_NOATIME   0x08

Definition at line 27 of file mount.h.

#define MNT_NODEV   0x02

Definition at line 25 of file mount.h.

#define MNT_NODIRATIME   0x10

Definition at line 28 of file mount.h.

#define MNT_NOEXEC   0x04

Definition at line 26 of file mount.h.

#define MNT_NOSUID   0x01

Definition at line 24 of file mount.h.

#define MNT_PROPAGATION_MASK   (MNT_SHARED | MNT_UNBINDABLE)

Definition at line 45 of file mount.h.

#define MNT_READONLY   0x40 /* does the user want this to be r/o? */

Definition at line 30 of file mount.h.

#define MNT_RELATIME   0x20

Definition at line 29 of file mount.h.

#define MNT_SHARED   0x1000 /* if the vfsmount is a shared mount */

Definition at line 35 of file mount.h.

#define MNT_SHARED_MASK   (MNT_UNBINDABLE)

Definition at line 44 of file mount.h.

#define MNT_SHRINKABLE   0x100

Definition at line 32 of file mount.h.

#define MNT_UNBINDABLE   0x2000 /* if the vfsmount is a unbindable mount */

Definition at line 36 of file mount.h.

#define MNT_WRITE_HOLD   0x200

Definition at line 33 of file mount.h.

Function Documentation

int __mnt_is_readonly ( struct vfsmount mnt)

Definition at line 232 of file namespace.c.

void mark_mounts_for_expiry ( struct list_head mounts)

Definition at line 1997 of file namespace.c.

int mnt_clone_write ( struct vfsmount mnt)

mnt_clone_write - get write access to a mount : the mount on which to take a write

This is effectively like mnt_want_write, except it must only be used to take an extra write reference on a mountpoint that we already know has a write reference on it. This allows some optimisation.

After finished, mnt_drop_write must be called as usual to drop the reference.

Definition at line 364 of file namespace.c.

void mnt_drop_write ( struct vfsmount mnt)

mnt_drop_write - give up write access to a mount : the mount on which to give up write access

Tells the low-level filesystem that we are done performing writes to it and also allows filesystem to be frozen again. Must be matched with mnt_want_write() call above.

Definition at line 435 of file namespace.c.

void mnt_drop_write_file ( struct file file)

Definition at line 447 of file namespace.c.

void mnt_pin ( struct vfsmount mnt)

Definition at line 916 of file namespace.c.

void mnt_set_expiry ( struct vfsmount mnt,
struct list_head expiry_list 
)

mnt_set_expiry - Put a mount on an expiration list : The mount to list. : The list to add the mount to.

Definition at line 1980 of file namespace.c.

void mnt_unpin ( struct vfsmount mnt)

Definition at line 924 of file namespace.c.

int mnt_want_write ( struct vfsmount m)

mnt_want_write - get write access to a mount : the mount on which to take a write

This tells the low-level filesystem that a write is about to be performed to it, and makes sure that writes are allowed (mount is read-write, filesystem is not frozen) before returning success. When the write operation is finished, mnt_drop_write() must be called. This is effectively a refcount.

Definition at line 340 of file namespace.c.

int mnt_want_write_file ( struct file file)

Definition at line 400 of file namespace.c.

struct vfsmount* mntget ( struct vfsmount mnt)
read

Definition at line 908 of file namespace.c.

void mntput ( struct vfsmount mnt)

Definition at line 896 of file namespace.c.

dev_t name_to_dev_t ( char name)

Definition at line 186 of file do_mounts.c.

struct vfsmount* vfs_kern_mount ( struct file_system_type type,
int  flags,
const char name,
void data 
)
read

Definition at line 744 of file namespace.c.