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>
Sun, 6 Mar 2011 08:42:04 +0000 (03:42 -0500)
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 05b441d9364202ff09ccaa4db7ca28044db30290..a05e1aa52ce30fff02cb68be101a34be1c514bb1 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <linux/dcache.h>
 #include <linux/linkage.h>
-#include <linux/path.h>
+#include <linux/mount.h>
 
 struct vfsmount;
 
@@ -96,4 +96,16 @@ static inline void nd_terminate_link(void *name, size_t len, size_t maxlen)
        ((char *) name)[min(len, maxlen)] = '\0';
 }
 
+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 */