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>
Wed, 20 May 2009 20:58:42 +0000 (16:58 -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 99eb80306dc5bba4fab74b9a1693222209d619ea..18ff90c87071d390ac013a05ed3c7967f7aab35e 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <linux/dcache.h>
 #include <linux/linkage.h>
-#include <linux/path.h>
+#include <linux/mount.h>
 
 struct vfsmount;
 
@@ -94,4 +94,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 */