diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-09-05 02:38:03 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-10-01 18:39:05 -0400 |
commit | 4e266229dbb0782d91b75633322edd632794b86d (patch) | |
tree | 9f677ece4ca723c4f036d25b77f133785adc57ed | |
parent | 96c9eae638765c2bf2ca4f5a6325484f9bb69aa7 (diff) |
pnfsblock: use list_move_tail instead of list_del/list_add_tail
Using list_move_tail() instead of list_del() + list_add_tail().
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | fs/nfs/blocklayout/extents.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/blocklayout/extents.c b/fs/nfs/blocklayout/extents.c index 1f9a6032796..9c3e117c3ed 100644 --- a/fs/nfs/blocklayout/extents.c +++ b/fs/nfs/blocklayout/extents.c | |||
@@ -683,8 +683,7 @@ encode_pnfs_block_layoutupdate(struct pnfs_block_layout *bl, | |||
683 | p = xdr_encode_hyper(p, lce->bse_length << SECTOR_SHIFT); | 683 | p = xdr_encode_hyper(p, lce->bse_length << SECTOR_SHIFT); |
684 | p = xdr_encode_hyper(p, 0LL); | 684 | p = xdr_encode_hyper(p, 0LL); |
685 | *p++ = cpu_to_be32(PNFS_BLOCK_READWRITE_DATA); | 685 | *p++ = cpu_to_be32(PNFS_BLOCK_READWRITE_DATA); |
686 | list_del(&lce->bse_node); | 686 | list_move_tail(&lce->bse_node, &bl->bl_committing); |
687 | list_add_tail(&lce->bse_node, &bl->bl_committing); | ||
688 | bl->bl_count--; | 687 | bl->bl_count--; |
689 | count++; | 688 | count++; |
690 | } | 689 | } |