fs: Introduce path{get,put}
authorErez Zadok <ezkcs.sunysb.edu>
Sun, 18 Mar 2007 23:23:52 +0000 (19:23 -0400)
committerErez_Zadok <ezk@cs.sunysb.edu>
Tue, 21 Aug 2007 22:38:32 +0000 (18:38 -0400)
Export drop_pagecache_sb symbol (for branch-management).

Signed-off-by: Erez Zadok <ezkcs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipekcs.sunysb.edu>
include/linux/namei.h

index 9b424f8756fc38a7d4b0c508368a557b930684b7..48711b86493edb05a5872aca8b903b0e0fde418f 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <linux/dcache.h>
 #include <linux/linkage.h>
+#include <linux/mount.h>
 
 struct vfsmount;
 
@@ -106,4 +107,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 */