summaryrefslogtreecommitdiff
path: root/include/linux/namei.h
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2004-06-26 21:53:53 +0100
committerAnton Altaparmakov <aia21@cantab.net>2004-06-26 21:53:53 +0100
commit320ed1994ecf7ccadaaa95196467565b34d8d686 (patch)
treeb36f16a87596469091c97d35002faa1b5c0360ab /include/linux/namei.h
parent702fdfcae9a47ec4976d82d3d0b4b4a41bd72a52 (diff)
parentf6a7507c1714f5cb4faaebc76a1d02260830be01 (diff)
Merge cantab.net:/home/src/bklinux-2.6
into cantab.net:/home/src/ntfs-2.6
Diffstat (limited to 'include/linux/namei.h')
-rw-r--r--include/linux/namei.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/namei.h b/include/linux/namei.h
index 4117cd90a345..adcafdec8ee7 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -10,12 +10,16 @@ struct open_intent {
int create_mode;
};
+enum { MAX_NESTED_LINKS = 5 };
+
struct nameidata {
struct dentry *dentry;
struct vfsmount *mnt;
struct qstr last;
unsigned int flags;
int last_type;
+ unsigned depth;
+ char *saved_names[MAX_NESTED_LINKS + 1];
/* Intent data */
union {
@@ -67,4 +71,14 @@ extern int follow_up(struct vfsmount **, struct dentry **);
extern struct dentry *lock_rename(struct dentry *, struct dentry *);
extern void unlock_rename(struct dentry *, struct dentry *);
+static inline void nd_set_link(struct nameidata *nd, char *path)
+{
+ nd->saved_names[nd->depth] = path;
+}
+
+static inline char *nd_get_link(struct nameidata *nd)
+{
+ return nd->saved_names[nd->depth];
+}
+
#endif /* _LINUX_NAMEI_H */