mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
To: linux-kernel@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, torvalds@osdl.org, akpm@osdl.org,
	hch@infradead.org, viro@ftp.linux.org.uk
Subject: [PATCH 2 of 23] lookup_one_len_nd - lookup_one_len with nameidata argument
Date: Sat, 07 Oct 2006 01:07:21 -0400	[thread overview]
Message-ID: <3104d077379c19c98510.1160197641@thor.fsl.cs.sunysb.edu> (raw)
In-Reply-To: <patchbomb.1160197639@thor.fsl.cs.sunysb.edu>

From: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>

This patch renames lookup_one_len to lookup_one_len_nd, and adds a nameidata
argument. An inline function, lookup_one_len (which calls lookup_one_len_nd
with nd == NULL) preserves original behavior.

The following Unionfs patches depend on this one.

Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>

---

2 files changed, 10 insertions(+), 5 deletions(-)
fs/namei.c            |    7 +++----
include/linux/namei.h |    8 +++++++-

diff -r 45185d249694 -r 3104d077379c fs/namei.c
--- a/fs/namei.c	Sat Oct 07 00:46:18 2006 -0400
+++ b/fs/namei.c	Sat Oct 07 00:46:18 2006 -0400
@@ -1295,8 +1295,7 @@ static struct dentry *lookup_hash(struct
 	return __lookup_hash(&nd->last, nd->dentry, nd);
 }
 
-/* SMP-safe */
-struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
+struct dentry * lookup_one_len_nd(const char *name, struct dentry * base, int len, struct nameidata *nd)
 {
 	unsigned long hash;
 	struct qstr this;
@@ -1316,7 +1315,7 @@ struct dentry * lookup_one_len(const cha
 	}
 	this.hash = end_name_hash(hash);
 
-	return __lookup_hash(&this, base, NULL);
+	return __lookup_hash(&this, base, nd);
 access:
 	return ERR_PTR(-EACCES);
 }
@@ -2761,7 +2760,7 @@ EXPORT_SYMBOL(get_write_access); /* binf
 EXPORT_SYMBOL(get_write_access); /* binfmt_aout */
 EXPORT_SYMBOL(getname);
 EXPORT_SYMBOL(lock_rename);
-EXPORT_SYMBOL(lookup_one_len);
+EXPORT_SYMBOL(lookup_one_len_nd);
 EXPORT_SYMBOL(page_follow_link_light);
 EXPORT_SYMBOL(page_put_link);
 EXPORT_SYMBOL(page_readlink);
diff -r 45185d249694 -r 3104d077379c include/linux/namei.h
--- a/include/linux/namei.h	Sat Oct 07 00:46:18 2006 -0400
+++ b/include/linux/namei.h	Sat Oct 07 00:46:18 2006 -0400
@@ -76,7 +76,13 @@ extern struct file *nameidata_to_filp(st
 extern struct file *nameidata_to_filp(struct nameidata *nd, int flags);
 extern void release_open_intent(struct nameidata *);
 
-extern struct dentry * lookup_one_len(const char *, struct dentry *, int);
+extern struct dentry * lookup_one_len_nd(const char *, struct dentry *, int, struct nameidata *);
+
+/* SMP-safe */
+static inline struct dentry *lookup_one_len(const char *name, struct dentry *dir, int len)
+{
+	return lookup_one_len_nd(name, dir, len, NULL);
+}
 
 extern int follow_down(struct vfsmount **, struct dentry **);
 extern int follow_up(struct vfsmount **, struct dentry **);



  parent reply	other threads:[~2006-10-07  6:02 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-07  5:07 [PATCH 0 of 23] Unionfs: Stackable Namespace Unification Filesystem Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 1 of 23] Unionfs: Documentation Josef Jeff Sipek
2006-10-07  5:07 ` Josef Jeff Sipek [this message]
2006-10-07 17:03   ` [PATCH 2 of 23] lookup_one_len_nd - lookup_one_len with nameidata argument Daniel Walker
2006-10-07 18:23     ` Josef Sipek
2006-10-07 18:37       ` Daniel Walker
2006-10-07  5:07 ` [PATCH 3 of 23] Unionfs: Branch management functionality Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 4 of 23] Unionfs: Common file operations Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 5 of 23] Unionfs: Copyup Functionality Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 6 of 23] Unionfs: Dentry operations Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 7 of 23] Unionfs: File operations Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 8 of 23] Unionfs: Directory file operations Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 9 of 23] Unionfs: Directory manipulation helper functions Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 10 of 23] Unionfs: Inode operations Josef Jeff Sipek
2006-10-13  8:53   ` Pekka Enberg
2006-10-07  5:07 ` [PATCH 11 of 23] Unionfs: Lookup helper functions Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 12 of 23] Unionfs: Main module functions Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 13 of 23] Unionfs: Readdir state Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 14 of 23] Unionfs: Rename Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 15 of 23] Unionfs: Privileged operations workqueue Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 16 of 23] Unionfs: Handling of stale inodes Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 17 of 23] Unionfs: Miscellaneous helper functions Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 18 of 23] Unionfs: Superblock operations Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 19 of 23] Unionfs: Helper macros/inlines Josef Jeff Sipek
2006-10-13  8:23   ` Pekka Enberg
2006-10-07  5:07 ` [PATCH 20 of 23] Unionfs: Internal include file Josef Jeff Sipek
2006-10-13  8:02   ` Pekka Enberg
2006-10-13  8:05     ` Pekka Enberg
2006-10-07  5:07 ` [PATCH 21 of 23] Unionfs: Include file Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 22 of 23] Unionfs: Unlink Josef Jeff Sipek
2006-10-07  5:07 ` [PATCH 23 of 23] Unionfs: Kconfig and Makefile Josef Jeff Sipek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3104d077379c19c98510.1160197641@thor.fsl.cs.sunysb.edu \
    --to=jsipek@cs.sunysb.edu \
    --cc=akpm@osdl.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®