diff options
author | Christoph Hellwig <hch@lst.de> | 2007-10-17 08:25:38 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 17:42:44 +0200 |
commit | eead19115329c5615ba03cbaf1c3fe24c14858a3 (patch) | |
tree | 4b8aeeea5060fca595f2c5e8290d742cdb14a08f /fs/sysfs | |
parent | Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/... (diff) | |
download | linux-eead19115329c5615ba03cbaf1c3fe24c14858a3.tar.xz linux-eead19115329c5615ba03cbaf1c3fe24c14858a3.zip |
partially fix up the lookup_one_noperm mess
Try to fix the mess created by sysfs braindamage.
- refactor code internal to fs/namei.c a little to avoid too much
duplication:
o __lookup_hash_kern is renamed back to __lookup_hash
o the old __lookup_hash goes away, permission checks moves to
the two callers
o useless inline qualifiers on above functions go away
- lookup_one_len_kern loses it's last argument and is renamed to
lookup_one_noperm to make it's useage a little more clear
- added kerneldoc comments to describe lookup_one_len aswell as
lookup_one_noperm and make it very clear that no one should use
the latter ever.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | fs/sysfs/dir.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index 9161db4d6b5c..d3118d482935 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c @@ -112,8 +112,7 @@ struct dentry *sysfs_get_dentry(struct sysfs_dirent *sd) /* look it up */ parent = dentry; mutex_lock(&parent->d_inode->i_mutex); - dentry = lookup_one_len_kern(cur->s_name, parent, - strlen(cur->s_name)); + dentry = lookup_one_noperm(cur->s_name, parent); mutex_unlock(&parent->d_inode->i_mutex); dput(parent); |