diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2008-10-15 22:50:27 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-23 09:13:16 (GMT) |
commit | 871c0067d53ba2dc35897c7da1da675bf4c70511 (patch) | |
tree | a76e6888d180a747df04155998bf8e595715da99 /fs/namei.c | |
parent | 9fbb76ce0fe96c07c44ba2aec3dc99f4b8d2b9c6 (diff) | |
download | linux-fsl-qoriq-871c0067d53ba2dc35897c7da1da675bf4c70511.tar.xz |
[PATCH vfs-2.6 1/6] vfs: replace parent == dentry->d_parent by IS_ROOT()
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1454,7 +1454,7 @@ struct dentry *lock_rename(struct dentry *p1, struct dentry *p2) mutex_lock(&p1->d_inode->i_sb->s_vfs_rename_mutex); - for (p = p1; p->d_parent != p; p = p->d_parent) { + for (p = p1; !IS_ROOT(p); p = p->d_parent) { if (p->d_parent == p2) { mutex_lock_nested(&p2->d_inode->i_mutex, I_MUTEX_PARENT); mutex_lock_nested(&p1->d_inode->i_mutex, I_MUTEX_CHILD); @@ -1462,7 +1462,7 @@ struct dentry *lock_rename(struct dentry *p1, struct dentry *p2) } } - for (p = p2; p->d_parent != p; p = p->d_parent) { + for (p = p2; !IS_ROOT(p); p = p->d_parent) { if (p->d_parent == p1) { mutex_lock_nested(&p1->d_inode->i_mutex, I_MUTEX_PARENT); mutex_lock_nested(&p2->d_inode->i_mutex, I_MUTEX_CHILD); |