diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-04 11:15:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-04 11:15:33 -0500 |
commit | 0f2cc4ecd81dc1917a041dc93db0ada28f8356fa (patch) | |
tree | f128b50f48f50f0cda6d2b20b53e9ad6e2dfded3 /fs/nilfs2/namei.c | |
parent | 1fae4cfb97302289bb5df6a8195eb28385d0b002 (diff) | |
parent | 9643f5d94aadd47a5fa9754fb60f2c957de05903 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (52 commits)
init: Open /dev/console from rootfs
mqueue: fix typo "failues" -> "failures"
mqueue: only set error codes if they are really necessary
mqueue: simplify do_open() error handling
mqueue: apply mathematics distributivity on mq_bytes calculation
mqueue: remove unneeded info->messages initialization
mqueue: fix mq_open() file descriptor leak on user-space processes
fix race in d_splice_alias()
set S_DEAD on unlink() and non-directory rename() victims
vfs: add NOFOLLOW flag to umount(2)
get rid of ->mnt_parent in tomoyo/realpath
hppfs can use existing proc_mnt, no need for do_kern_mount() in there
Mirror MS_KERNMOUNT in ->mnt_flags
get rid of useless vfsmount_lock use in put_mnt_ns()
Take vfsmount_lock to fs/internal.h
get rid of insanity with namespace roots in tomoyo
take check for new events in namespace (guts of mounts_poll()) to namespace.c
Don't mess with generic_permission() under ->d_lock in hpfs
sanitize const/signedness for udf
nilfs: sanitize const/signedness in dealing with ->d_name.name
...
Fix up fairly trivial (famous last words...) conflicts in
drivers/infiniband/core/uverbs_main.c and security/tomoyo/realpath.c
Diffstat (limited to 'fs/nilfs2/namei.c')
-rw-r--r-- | fs/nilfs2/namei.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c index 07ba838ef089..ad6ed2cf19b4 100644 --- a/fs/nilfs2/namei.c +++ b/fs/nilfs2/namei.c | |||
@@ -67,7 +67,7 @@ nilfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) | |||
67 | if (dentry->d_name.len > NILFS_NAME_LEN) | 67 | if (dentry->d_name.len > NILFS_NAME_LEN) |
68 | return ERR_PTR(-ENAMETOOLONG); | 68 | return ERR_PTR(-ENAMETOOLONG); |
69 | 69 | ||
70 | ino = nilfs_inode_by_name(dir, dentry); | 70 | ino = nilfs_inode_by_name(dir, &dentry->d_name); |
71 | inode = NULL; | 71 | inode = NULL; |
72 | if (ino) { | 72 | if (ino) { |
73 | inode = nilfs_iget(dir->i_sb, ino); | 73 | inode = nilfs_iget(dir->i_sb, ino); |
@@ -81,10 +81,7 @@ struct dentry *nilfs_get_parent(struct dentry *child) | |||
81 | { | 81 | { |
82 | unsigned long ino; | 82 | unsigned long ino; |
83 | struct inode *inode; | 83 | struct inode *inode; |
84 | struct dentry dotdot; | 84 | struct qstr dotdot = {.name = "..", .len = 2}; |
85 | |||
86 | dotdot.d_name.name = ".."; | ||
87 | dotdot.d_name.len = 2; | ||
88 | 85 | ||
89 | ino = nilfs_inode_by_name(child->d_inode, &dotdot); | 86 | ino = nilfs_inode_by_name(child->d_inode, &dotdot); |
90 | if (!ino) | 87 | if (!ino) |
@@ -296,7 +293,7 @@ static int nilfs_do_unlink(struct inode *dir, struct dentry *dentry) | |||
296 | int err; | 293 | int err; |
297 | 294 | ||
298 | err = -ENOENT; | 295 | err = -ENOENT; |
299 | de = nilfs_find_entry(dir, dentry, &page); | 296 | de = nilfs_find_entry(dir, &dentry->d_name, &page); |
300 | if (!de) | 297 | if (!de) |
301 | goto out; | 298 | goto out; |
302 | 299 | ||
@@ -389,7 +386,7 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
389 | return err; | 386 | return err; |
390 | 387 | ||
391 | err = -ENOENT; | 388 | err = -ENOENT; |
392 | old_de = nilfs_find_entry(old_dir, old_dentry, &old_page); | 389 | old_de = nilfs_find_entry(old_dir, &old_dentry->d_name, &old_page); |
393 | if (!old_de) | 390 | if (!old_de) |
394 | goto out; | 391 | goto out; |
395 | 392 | ||
@@ -409,7 +406,7 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
409 | goto out_dir; | 406 | goto out_dir; |
410 | 407 | ||
411 | err = -ENOENT; | 408 | err = -ENOENT; |
412 | new_de = nilfs_find_entry(new_dir, new_dentry, &new_page); | 409 | new_de = nilfs_find_entry(new_dir, &new_dentry->d_name, &new_page); |
413 | if (!new_de) | 410 | if (!new_de) |
414 | goto out_dir; | 411 | goto out_dir; |
415 | inc_nlink(old_inode); | 412 | inc_nlink(old_inode); |