login
Header Space

 
 

[PATCH 27/29] VFS path get/put ops used by Unionfs

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <torvalds@...>, <akpm@...>, <hch@...>, <viro@...>
Cc: <linux-kernel@...>, <linux-fsdevel@...>, Erez Zadok <ezk@...>
Date: Thursday, January 10, 2008 - 10:59 am

Note: this will become obsolete once similar patches, now in -mm, make it to
mainline.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
---
 include/linux/namei.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/include/linux/namei.h b/include/linux/namei.h
index 4cb4f8d..63f16d9 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -3,6 +3,7 @@
 
 #include <linux/dcache.h>
 #include <linux/linkage.h>
+#include <linux/mount.h>
 
 struct vfsmount;
 
@@ -100,4 +101,16 @@ static inline char *nd_get_link(struct nameidata *nd)
 	return nd->saved_names[nd->depth];
 }
 
+static inline void pathget(struct path *path)
+{
+	mntget(path->mnt);
+	dget(path->dentry);
+}
+
+static inline void pathput(struct path *path)
+{
+	dput(path->dentry);
+	mntput(path->mnt);
+}
+
 #endif /* _LINUX_NAMEI_H */
-- 
1.5.2.2

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [UNIONFS] 00/29 Unionfs and related patches pre-merge re..., Christoph Hellwig, (Thu Jan 10, 11:08 am)
[PATCH 24/29] Unionfs: debugging infrastructure, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 11/29] Unionfs: lower-level lookup routines, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 20/29] Unionfs: super_block operations, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 10/29] Unionfs: dentry revalidation, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 16/29] Unionfs: inode operations, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 06/29] Unionfs: main header file, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 12/29] Unionfs: rename method and helpers, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 18/29] Unionfs: address-space operations, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 21/29] Unionfs: extended attributes operations, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 22/29] Unionfs: async I/O queue, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 23/29] Unionfs: miscellaneous helper routines, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 05/29] Unionfs: fanout header definitions, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 14/29] Unionfs: readdir helper functions, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 28/29] VFS: export release_open_intent symbol, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 08/29] Unionfs: basic file operations, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 25/29] Unionfs file system magic number, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 04/29] Unionfs: main Makefile, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 15/29] Unionfs: readdir state helpers, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 03/29] Makefile: hook to compile unionfs, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 01/29] Unionfs: documentation, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 17/29] Unionfs: unlink/rmdir operations, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 09/29] Unionfs: lower-level copyup routines, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 27/29] VFS path get/put ops used by Unionfs, Erez Zadok, (Thu Jan 10, 10:59 am)
speck-geostationary