From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erez Zadok Subject: [PATCH 34/42] VFS path get/put ops used by Unionfs Date: Sun, 9 Dec 2007 21:42:07 -0500 Message-ID: <11972545582872-git-send-email-ezk@cs.sunysb.edu> References: <11972545353262-git-send-email-ezk@cs.sunysb.edu> Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Erez Zadok To: hch@infradead.org, viro@ftp.linux.org.uk, akpm@linux-foundation.org Return-path: Received: from filer.fsl.cs.sunysb.edu ([130.245.126.2]:49846 "EHLO filer.fsl.cs.sunysb.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755083AbXLJCnw (ORCPT ); Sun, 9 Dec 2007 21:43:52 -0500 In-Reply-To: <11972545353262-git-send-email-ezk@cs.sunysb.edu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Note: this will become obsolete once similar patches, now in -mm, make it to mainline. Signed-off-by: Erez Zadok --- 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 #include +#include 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