diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-01-31 21:02:09 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-03 14:07:58 -0500 |
commit | 0319003d0d229735770c185ddf132c666e9cd01a (patch) | |
tree | b6c7e8d10bc09816ae20711fac24fd5b9f63a4ca /fs/nilfs2/dir.c | |
parent | 89031bc79782a93fc65adabd0e123c89645bee6e (diff) | |
download | linux-0319003d0d229735770c185ddf132c666e9cd01a.tar.bz2 |
nilfs really shouldn't slap struct dentry on stack...
... especially when it only needs (and initializes) .d_name of it
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nilfs2/dir.c')
-rw-r--r-- | fs/nilfs2/dir.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c index 76d803e060a9..26402b9b305e 100644 --- a/fs/nilfs2/dir.c +++ b/fs/nilfs2/dir.c @@ -349,11 +349,11 @@ done: * Entry is guaranteed to be valid. */ struct nilfs_dir_entry * -nilfs_find_entry(struct inode *dir, struct dentry *dentry, +nilfs_find_entry(struct inode *dir, const struct qstr *qstr, struct page **res_page) { - const char *name = dentry->d_name.name; - int namelen = dentry->d_name.len; + const unsigned char *name = qstr->name; + int namelen = qstr->len; unsigned reclen = NILFS_DIR_REC_LEN(namelen); unsigned long start, n; unsigned long npages = dir_pages(dir); @@ -424,13 +424,13 @@ struct nilfs_dir_entry *nilfs_dotdot(struct inode *dir, struct page **p) return de; } -ino_t nilfs_inode_by_name(struct inode *dir, struct dentry *dentry) +ino_t nilfs_inode_by_name(struct inode *dir, const struct qstr *qstr) { ino_t res = 0; struct nilfs_dir_entry *de; struct page *page; - de = nilfs_find_entry(dir, dentry, &page); + de = nilfs_find_entry(dir, qstr, &page); if (de) { res = le64_to_cpu(de->inode); kunmap(page); |