aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2008-10-15 18:50:27 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-23 05:13:16 -0400
commit871c0067d53ba2dc35897c7da1da675bf4c70511 (patch)
treea76e6888d180a747df04155998bf8e595715da99 /fs/namei.c
parent9fbb76ce0fe96c07c44ba2aec3dc99f4b8d2b9c6 (diff)
[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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 2b8f823eda44..068a9e50c8c0 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1454,7 +1454,7 @@ struct dentry *lock_rename(struct dentry *p1, struct dentry *p2)
1454 1454
1455 mutex_lock(&p1->d_inode->i_sb->s_vfs_rename_mutex); 1455 mutex_lock(&p1->d_inode->i_sb->s_vfs_rename_mutex);
1456 1456
1457 for (p = p1; p->d_parent != p; p = p->d_parent) { 1457 for (p = p1; !IS_ROOT(p); p = p->d_parent) {
1458 if (p->d_parent == p2) { 1458 if (p->d_parent == p2) {
1459 mutex_lock_nested(&p2->d_inode->i_mutex, I_MUTEX_PARENT); 1459 mutex_lock_nested(&p2->d_inode->i_mutex, I_MUTEX_PARENT);
1460 mutex_lock_nested(&p1->d_inode->i_mutex, I_MUTEX_CHILD); 1460 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)
1462 } 1462 }
1463 } 1463 }
1464 1464
1465 for (p = p2; p->d_parent != p; p = p->d_parent) { 1465 for (p = p2; !IS_ROOT(p); p = p->d_parent) {
1466 if (p->d_parent == p1) { 1466 if (p->d_parent == p1) {
1467 mutex_lock_nested(&p1->d_inode->i_mutex, I_MUTEX_PARENT); 1467 mutex_lock_nested(&p1->d_inode->i_mutex, I_MUTEX_PARENT);
1468 mutex_lock_nested(&p2->d_inode->i_mutex, I_MUTEX_CHILD); 1468 mutex_lock_nested(&p2->d_inode->i_mutex, I_MUTEX_CHILD);