aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-16 14:31:50 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-16 14:31:50 -0500
commitf8206b925fb0eba3a11839419be118b09105d7b1 (patch)
tree5d41b356a043da09c816ed80bd79d1ea8b2b47e5 /include
parent1b59be2a6cdcb5a12e18d8315c07c94a624de48f (diff)
parentf03c65993b98eeb909a4012ce7833c5857d74755 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (23 commits) sanitize vfsmount refcounting changes fix old umount_tree() breakage autofs4: Merge the remaining dentry ops tables Unexport do_add_mount() and add in follow_automount(), not ->d_automount() Allow d_manage() to be used in RCU-walk mode Remove a further kludge from __do_follow_link() autofs4: Bump version autofs4: Add v4 pseudo direct mount support autofs4: Fix wait validation autofs4: Clean up autofs4_free_ino() autofs4: Clean up dentry operations autofs4: Clean up inode operations autofs4: Remove unused code autofs4: Add d_manage() dentry operation autofs4: Add d_automount() dentry operation Remove the automount through follow_link() kludge code from pathwalk CIFS: Use d_automount() rather than abusing follow_link() NFS: Use d_automount() rather than abusing follow_link() AFS: Use d_automount() rather than abusing follow_link() Add an AT_NO_AUTOMOUNT flag to suppress terminal automount ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/auto_fs4.h2
-rw-r--r--include/linux/dcache.h16
-rw-r--r--include/linux/fcntl.h1
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/mount.h11
-rw-r--r--include/linux/namei.h5
-rw-r--r--include/linux/nfs_fs.h1
-rw-r--r--include/linux/path.h2
8 files changed, 24 insertions, 16 deletions
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h
index 8b49ac48a5b7..e02982fa2953 100644
--- a/include/linux/auto_fs4.h
+++ b/include/linux/auto_fs4.h
@@ -24,7 +24,7 @@
24#define AUTOFS_MIN_PROTO_VERSION 3 24#define AUTOFS_MIN_PROTO_VERSION 3
25#define AUTOFS_MAX_PROTO_VERSION 5 25#define AUTOFS_MAX_PROTO_VERSION 5
26 26
27#define AUTOFS_PROTO_SUBVERSION 1 27#define AUTOFS_PROTO_SUBVERSION 2
28 28
29/* Mask for expire behaviour */ 29/* Mask for expire behaviour */
30#define AUTOFS_EXP_IMMEDIATE 1 30#define AUTOFS_EXP_IMMEDIATE 1
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 59fcd24b1468..f958c19e3ca5 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -167,6 +167,8 @@ struct dentry_operations {
167 void (*d_release)(struct dentry *); 167 void (*d_release)(struct dentry *);
168 void (*d_iput)(struct dentry *, struct inode *); 168 void (*d_iput)(struct dentry *, struct inode *);
169 char *(*d_dname)(struct dentry *, char *, int); 169 char *(*d_dname)(struct dentry *, char *, int);
170 struct vfsmount *(*d_automount)(struct path *);
171 int (*d_manage)(struct dentry *, bool, bool);
170} ____cacheline_aligned; 172} ____cacheline_aligned;
171 173
172/* 174/*
@@ -205,13 +207,18 @@ struct dentry_operations {
205 207
206#define DCACHE_CANT_MOUNT 0x0100 208#define DCACHE_CANT_MOUNT 0x0100
207#define DCACHE_GENOCIDE 0x0200 209#define DCACHE_GENOCIDE 0x0200
208#define DCACHE_MOUNTED 0x0400 /* is a mountpoint */
209 210
210#define DCACHE_OP_HASH 0x1000 211#define DCACHE_OP_HASH 0x1000
211#define DCACHE_OP_COMPARE 0x2000 212#define DCACHE_OP_COMPARE 0x2000
212#define DCACHE_OP_REVALIDATE 0x4000 213#define DCACHE_OP_REVALIDATE 0x4000
213#define DCACHE_OP_DELETE 0x8000 214#define DCACHE_OP_DELETE 0x8000
214 215
216#define DCACHE_MOUNTED 0x10000 /* is a mountpoint */
217#define DCACHE_NEED_AUTOMOUNT 0x20000 /* handle automount on this dir */
218#define DCACHE_MANAGE_TRANSIT 0x40000 /* manage transit from this dirent */
219#define DCACHE_MANAGED_DENTRY \
220 (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT)
221
215extern seqlock_t rename_lock; 222extern seqlock_t rename_lock;
216 223
217static inline int dname_external(struct dentry *dentry) 224static inline int dname_external(struct dentry *dentry)
@@ -399,7 +406,12 @@ static inline void dont_mount(struct dentry *dentry)
399 406
400extern void dput(struct dentry *); 407extern void dput(struct dentry *);
401 408
402static inline int d_mountpoint(struct dentry *dentry) 409static inline bool d_managed(struct dentry *dentry)
410{
411 return dentry->d_flags & DCACHE_MANAGED_DENTRY;
412}
413
414static inline bool d_mountpoint(struct dentry *dentry)
403{ 415{
404 return dentry->d_flags & DCACHE_MOUNTED; 416 return dentry->d_flags & DCACHE_MOUNTED;
405} 417}
diff --git a/include/linux/fcntl.h b/include/linux/fcntl.h
index afc00af3229b..a562fa5fb4e3 100644
--- a/include/linux/fcntl.h
+++ b/include/linux/fcntl.h
@@ -45,6 +45,7 @@
45#define AT_REMOVEDIR 0x200 /* Remove directory instead of 45#define AT_REMOVEDIR 0x200 /* Remove directory instead of
46 unlinking file. */ 46 unlinking file. */
47#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ 47#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
48#define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount traversal */
48 49
49#ifdef __KERNEL__ 50#ifdef __KERNEL__
50 51
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 08824e0ef381..177b4ddea418 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -242,6 +242,7 @@ struct inodes_stat_t {
242#define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */ 242#define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */
243#define S_PRIVATE 512 /* Inode is fs-internal */ 243#define S_PRIVATE 512 /* Inode is fs-internal */
244#define S_IMA 1024 /* Inode has an associated IMA struct */ 244#define S_IMA 1024 /* Inode has an associated IMA struct */
245#define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */
245 246
246/* 247/*
247 * Note that nosuid etc flags are inode-specific: setting some file-system 248 * Note that nosuid etc flags are inode-specific: setting some file-system
@@ -277,6 +278,7 @@ struct inodes_stat_t {
277#define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE) 278#define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE)
278#define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE) 279#define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE)
279#define IS_IMA(inode) ((inode)->i_flags & S_IMA) 280#define IS_IMA(inode) ((inode)->i_flags & S_IMA)
281#define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT)
280 282
281/* the read-only stuff doesn't really belong here, but any other place is 283/* the read-only stuff doesn't really belong here, but any other place is
282 probably as bad and I don't want to create yet another include file. */ 284 probably as bad and I don't want to create yet another include file. */
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 1869ea24a739..604f122a2326 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -60,7 +60,7 @@ struct vfsmount {
60 struct super_block *mnt_sb; /* pointer to superblock */ 60 struct super_block *mnt_sb; /* pointer to superblock */
61#ifdef CONFIG_SMP 61#ifdef CONFIG_SMP
62 struct mnt_pcp __percpu *mnt_pcp; 62 struct mnt_pcp __percpu *mnt_pcp;
63 atomic_t mnt_longrefs; 63 atomic_t mnt_longterm; /* how many of the refs are longterm */
64#else 64#else
65 int mnt_count; 65 int mnt_count;
66 int mnt_writers; 66 int mnt_writers;
@@ -96,8 +96,6 @@ extern int mnt_clone_write(struct vfsmount *mnt);
96extern void mnt_drop_write(struct vfsmount *mnt); 96extern void mnt_drop_write(struct vfsmount *mnt);
97extern void mntput(struct vfsmount *mnt); 97extern void mntput(struct vfsmount *mnt);
98extern struct vfsmount *mntget(struct vfsmount *mnt); 98extern struct vfsmount *mntget(struct vfsmount *mnt);
99extern void mntput_long(struct vfsmount *mnt);
100extern struct vfsmount *mntget_long(struct vfsmount *mnt);
101extern void mnt_pin(struct vfsmount *mnt); 99extern void mnt_pin(struct vfsmount *mnt);
102extern void mnt_unpin(struct vfsmount *mnt); 100extern void mnt_unpin(struct vfsmount *mnt);
103extern int __mnt_is_readonly(struct vfsmount *mnt); 101extern int __mnt_is_readonly(struct vfsmount *mnt);
@@ -110,12 +108,7 @@ extern struct vfsmount *vfs_kern_mount(struct file_system_type *type,
110 int flags, const char *name, 108 int flags, const char *name,
111 void *data); 109 void *data);
112 110
113struct nameidata; 111extern void mnt_set_expiry(struct vfsmount *mnt, struct list_head *expiry_list);
114
115struct path;
116extern int do_add_mount(struct vfsmount *newmnt, struct path *path,
117 int mnt_flags, struct list_head *fslist);
118
119extern void mark_mounts_for_expiry(struct list_head *mounts); 112extern void mark_mounts_for_expiry(struct list_head *mounts);
120 113
121extern dev_t name_to_dev_t(char *name); 114extern dev_t name_to_dev_t(char *name);
diff --git a/include/linux/namei.h b/include/linux/namei.h
index 18d06add0a40..f276d4fa01fc 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -45,6 +45,7 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
45 * - ending slashes ok even for nonexistent files 45 * - ending slashes ok even for nonexistent files
46 * - internal "there are more path components" flag 46 * - internal "there are more path components" flag
47 * - dentry cache is untrusted; force a real lookup 47 * - dentry cache is untrusted; force a real lookup
48 * - suppress terminal automount
48 */ 49 */
49#define LOOKUP_FOLLOW 0x0001 50#define LOOKUP_FOLLOW 0x0001
50#define LOOKUP_DIRECTORY 0x0002 51#define LOOKUP_DIRECTORY 0x0002
@@ -53,6 +54,7 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
53#define LOOKUP_PARENT 0x0010 54#define LOOKUP_PARENT 0x0010
54#define LOOKUP_REVAL 0x0020 55#define LOOKUP_REVAL 0x0020
55#define LOOKUP_RCU 0x0040 56#define LOOKUP_RCU 0x0040
57#define LOOKUP_NO_AUTOMOUNT 0x0080
56/* 58/*
57 * Intent data 59 * Intent data
58 */ 60 */
@@ -79,7 +81,8 @@ extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry
79 81
80extern struct dentry *lookup_one_len(const char *, struct dentry *, int); 82extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
81 83
82extern int follow_down(struct path *); 84extern int follow_down_one(struct path *);
85extern int follow_down(struct path *, bool);
83extern int follow_up(struct path *); 86extern int follow_up(struct path *);
84 87
85extern struct dentry *lock_rename(struct dentry *, struct dentry *); 88extern struct dentry *lock_rename(struct dentry *, struct dentry *);
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 0779bb8f95be..6023efa9f5d9 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -215,7 +215,6 @@ struct nfs_inode {
215#define NFS_INO_ADVISE_RDPLUS (0) /* advise readdirplus */ 215#define NFS_INO_ADVISE_RDPLUS (0) /* advise readdirplus */
216#define NFS_INO_STALE (1) /* possible stale inode */ 216#define NFS_INO_STALE (1) /* possible stale inode */
217#define NFS_INO_ACL_LRU_SET (2) /* Inode is on the LRU list */ 217#define NFS_INO_ACL_LRU_SET (2) /* Inode is on the LRU list */
218#define NFS_INO_MOUNTPOINT (3) /* inode is remote mountpoint */
219#define NFS_INO_FLUSHING (4) /* inode is flushing out data */ 218#define NFS_INO_FLUSHING (4) /* inode is flushing out data */
220#define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ 219#define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */
221#define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ 220#define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */
diff --git a/include/linux/path.h b/include/linux/path.h
index a581e8c06533..edc98dec6266 100644
--- a/include/linux/path.h
+++ b/include/linux/path.h
@@ -10,9 +10,7 @@ struct path {
10}; 10};
11 11
12extern void path_get(struct path *); 12extern void path_get(struct path *);
13extern void path_get_long(struct path *);
14extern void path_put(struct path *); 13extern void path_put(struct path *);
15extern void path_put_long(struct path *);
16 14
17static inline int path_equal(const struct path *path1, const struct path *path2) 15static inline int path_equal(const struct path *path1, const struct path *path2)
18{ 16{