diff options
author | Christoph Hellwig <hch@lst.de> | 2005-06-23 03:09:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-23 12:45:20 -0400 |
commit | 5f45f1a78fbac3cc859ec10c5366e97d20d40fa2 (patch) | |
tree | bafacf11adbfb4eebf2d2d80d92e1fe2d9c02b18 /kernel | |
parent | ac20427ef6aa63da663bdc88b71d16f7394f5e23 (diff) |
[PATCH] remove duplicate get_dentry functions in various places
Various filesystem drivers have grown a get_dentry() function that's a
duplicate of lookup_one_len, except that it doesn't take a maximum length
argument and doesn't check for \0 or / in the passed in filename.
Switch all these places to use lookup_one_len.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Greg KH <greg@kroah.com>
Cc: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cpuset.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 00e8f2575512..79dd929f4084 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -228,13 +228,7 @@ static struct dentry_operations cpuset_dops = { | |||
228 | 228 | ||
229 | static struct dentry *cpuset_get_dentry(struct dentry *parent, const char *name) | 229 | static struct dentry *cpuset_get_dentry(struct dentry *parent, const char *name) |
230 | { | 230 | { |
231 | struct qstr qstr; | 231 | struct dentry *d = lookup_one_len(name, parent, strlen(name)); |
232 | struct dentry *d; | ||
233 | |||
234 | qstr.name = name; | ||
235 | qstr.len = strlen(name); | ||
236 | qstr.hash = full_name_hash(name, qstr.len); | ||
237 | d = lookup_hash(&qstr, parent); | ||
238 | if (!IS_ERR(d)) | 232 | if (!IS_ERR(d)) |
239 | d->d_op = &cpuset_dops; | 233 | d->d_op = &cpuset_dops; |
240 | return d; | 234 | return d; |