diff options
author | Akinobu Mita <mita@miraclelinux.com> | 2006-06-26 03:24:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 12:58:17 -0400 |
commit | 1bfba4e8ea0e555e3a0296051517d96253660ccc (patch) | |
tree | 48ced9016b5c08f1be217677c25e6879c07b5278 /fs/pnode.c | |
parent | a7addcea6ac7c0e9733a48cda06ca0880f116a48 (diff) |
[PATCH] core: use list_move()
This patch converts the combination of list_del(A) and list_add(A, B) to
list_move(A, B).
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/pnode.c')
-rw-r--r-- | fs/pnode.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/pnode.c b/fs/pnode.c index 37b568ed0e0..da42ee61c1d 100644 --- a/fs/pnode.c +++ b/fs/pnode.c | |||
@@ -53,8 +53,7 @@ static int do_make_slave(struct vfsmount *mnt) | |||
53 | if (master) { | 53 | if (master) { |
54 | list_for_each_entry(slave_mnt, &mnt->mnt_slave_list, mnt_slave) | 54 | list_for_each_entry(slave_mnt, &mnt->mnt_slave_list, mnt_slave) |
55 | slave_mnt->mnt_master = master; | 55 | slave_mnt->mnt_master = master; |
56 | list_del(&mnt->mnt_slave); | 56 | list_move(&mnt->mnt_slave, &master->mnt_slave_list); |
57 | list_add(&mnt->mnt_slave, &master->mnt_slave_list); | ||
58 | list_splice(&mnt->mnt_slave_list, master->mnt_slave_list.prev); | 57 | list_splice(&mnt->mnt_slave_list, master->mnt_slave_list.prev); |
59 | INIT_LIST_HEAD(&mnt->mnt_slave_list); | 58 | INIT_LIST_HEAD(&mnt->mnt_slave_list); |
60 | } else { | 59 | } else { |
@@ -283,10 +282,8 @@ static void __propagate_umount(struct vfsmount *mnt) | |||
283 | * umount the child only if the child has no | 282 | * umount the child only if the child has no |
284 | * other children | 283 | * other children |
285 | */ | 284 | */ |
286 | if (child && list_empty(&child->mnt_mounts)) { | 285 | if (child && list_empty(&child->mnt_mounts)) |
287 | list_del(&child->mnt_hash); | 286 | list_move_tail(&child->mnt_hash, &mnt->mnt_hash); |
288 | list_add_tail(&child->mnt_hash, &mnt->mnt_hash); | ||
289 | } | ||
290 | } | 287 | } |
291 | } | 288 | } |
292 | 289 | ||